Modal and dependent form

mariluzrm

Member
Hello.

I've been looking at the wiki and the forum, but I don't see a way to solve it. I would like to have a form "Student" (Student table, fields: student_id, name, address,...) that has a "JOIN Repeatable" (Data -> Joins section) to "Hobbies" (Hobbies table, fields: hobby, start_date, place, ..., student_id). I would like to have a button (or similar, for each hobby) in the Student form and from there access a modal form to be able to edit that Hobby. But I would like the modal form to be dependent on the "Student" form, that is, the hobbies would not be saved until the student was saved. It also makes sense, because when creating the Student the student_id does not yet exist and the student_id cannot be saved in the hobbies table...

Thank you!!
 
Do you mean a repeatable group (Data -> Joins section)? But with this, it is displayed in the same form, not in another separate modal form, right? I need it in another form (I have a lot of associated data in Hobby). And also that the Hobbies form is dependent on the Student form
 
I would like the modal form to be dependent on the "Student" form, that is, the hobbies would not be saved until the student was saved.
To be honest: I don't have an idea, how this could be done.
You would need to save the hobby-data somewhere (temporary), when the modal window is closed. And when the students form is closed, move the temporary date to the hobby list. Not an easy task.
 
In the Hobbies table there are the fields: hobby_id, start_date, place, ... , hobby_type, student_id). Each record is only for a single Student (because its start_date, etc.) is indicated. Although the hobby_type field can have the same value in several students, but that is not important...

Can I then create and update these records from the Hobbies table in a modal form dependent (the hobbies would not be saved until the student was saved) on the Student form?
 
Last edited:
Ah, ok.
So have a look at the related data links, maybe this is what you need.
https://fabrikar.com/forums/index.php?wiki/list-related-data/
Hobbies.student_id must be a dbjoin element to Student.
Then in the Student list you can enable related data and in the Student form/Options enable the links also in the form.
But the student record must to be saved once before you can edit it again and add/edit hobbies.

Otherwise it's as @wezetel said: You need to handle the hobbies in a repeat group or do complicated stuff on your own.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top