Multiple Dropdowns in one form #1428
-
Hello, I hope you are well! I have the following form I am trying to create: Student Name - Text Field I have all of the above fields wrapped in a form called 'Student Submission Form' in which the form's schema is the name of the Query to be executed, 'submitStudent'. I also created 2 internal options columns called 'Grades' and 'Programs'. So the components look something like this (I will put it in brackets for readability): [form 'Student Submission Form' with schema 'submitStudent'] The issue is, when I bind the fields to the 'submitStudent' query, I can successfully send the 'Student Name' text field value. However, the values for 'Grade' and 'Program' are blank. I can access the Grade value from within the form 'Grade', but I cannot access the value from the 'Student Submission Form'. What am I doing wrong? Please help. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @tasneemimamkhan! It sounds like the problem is just the scope of the forms. I'm impressed that you've already worked out that you can use additional forms bound to internal tables to provide options pickers because The way button actions work is that the button can only use values that are in their direct scope - so because the forms for "Grade" and "Program" are siblings of the button rather than parents, it can't see their values. I think there's a solution for this though. You'll need to ensure that the Button component is inside all the forms, so try making your component tree look like this:
I think that if your component tree looked like this then you'd be able to use values from all the forms in your query handler. I appreciate that this is a bit strange though and it's got me thinking about better ways we could handle this. I think there are 2 solutions which would make this problem easier - either allowing |
Beta Was this translation helpful? Give feedback.
Hey @tasneemimamkhan! It sounds like the problem is just the scope of the forms. I'm impressed that you've already worked out that you can use additional forms bound to internal tables to provide options pickers because
options
isn't a valid type for external sources at the moment.The way button actions work is that the button can only use values that are in their direct scope - so because the forms for "Grade" and "Program" are siblings of the button rather than parents, it can't see their values. I think there's a solution for this though. You'll need to ensure that the Button component is inside all the forms, so try making your component tree look like this: