Hello, I’m creating a simple training application.
So I have the Teacher, Student, Student Training and the Training Exercise.
I made all the relationships in the tables and everything has been working well.
However, I’m having trouble registering.
Scenario: Teacher created a student and now he needs to create the student’s training, but at the time of creating the training, even though he is already in the student context, he needs to fill in the “relation_student” column.
So my question is, how do I make the relation column inherit the form context?
I’m showing a different scenario than my first post, but it’s the same idea.
The only solution I found was to force the user to select the workout, even if he is already in that context.
But since I’m already in the training context. Ex: Day 2
The second input, which is “treino_id” is the training ID, but there is no way (or I don’t know how) to choose it to be the ID of the context that the user is in.