Call the subforms name from an element within the subform itself
The ability to call the subforms name from within the subform itself would allow the conditional value of an element to be set based on its parents name.
This will allow a single subform to be used multiple times for a number of different situations which are basically the same but slightly different.
For example the subform names are socket / rope / mast (they are all the same subform template but each instance is given a different name). An element within the subform template is ref_dim. The conditional value is ref_dim will show only when the parent subform is named 'rope'.
It is difficult to explain but I believe it will make maintenance and changes to the subforms much easier because instead of having 3 identical subform templates with one slightly different (i.e. with the ref_dim element etc.) you could have a single subform template.
This makes a huge difference when you have 50 location types and thus currently require 50 slightly different subforms instead of one subform with a bunch of elements which only show when the correct name is given to an instance.
-
Cameron, Lucas,
I wanted to get a little more clarity on the use case as we're discussing potential solutions. We have an enhancement to add two new built-in functions that would print the name and the label of a form. However, given the original post I'm not quite sure this satisfies the requirement since you're looking to query the parent form's name is that correct? In that scenario a function to return the parent form's name/label or even ID would be necessary.
The more we know the better we can do so any insight is appreciated.
Thanks!
-
Hi Jonathan,
What I believe we are both asking for (Cameron correct me if I am wrong) is to be able to use a sub-forms name in conditional statements of elements contained within the given sub-form.
This would mean the same sub-form could be used multiple times but each instance would show different elements (filtered by the name given to the sub-form instance).
Example:
Parent Form
----| - Sub Form - Name: Sub1
----|----| - Element 1 - (shows only when Sub-Form name is set to Sub1)
----|----| - Element 2 - (hidden)
----|----| - Element 3 - (hidden)
----|----| - Element 4 - (hidden)
----| - Sub Form - Name: Sub2 (same sub-form just different name)
----|----| - Element 1 - (hidden)
----|----| - Element 2 - (shows only when Sub-Form name is set to Sub2)
----|----| - Element 3 - (shows only when Sub-Form name is set to Sub2)
----|----| - Element 4 - (hidden)
----| - Sub Form - Name: Sub3 (same sub-form just different name)
----|----| - Element 1 - (hidden)
----|----| - Element 2 - (hidden)
----|----| - Element 3 - (hidden)
----|----| - Element 4 - (shows only when Sub-Form name is set to Sub3)
-
Lucas,
Thanks I think that clears things up for me. You want the data-column-name of the parent element. So if you use the same same subform twice in a form you know which time it was used. For example if you have a photo subform used for both before and after pictures you can differentiate the two and subsequently build resulting Smart Controls.
-
Sorry Jonathan,
Your reply confused me a little. See image below.
We want to be able to use a conditional value: if(sub-form-name = "rope_1") Then for elements inside the sub-form.
Would be great to be able to use the same new property for values too. This would help us remove required selections when building captions/tags for images etc. eg. inside the sub_form named Rope 1 all captions would contain Rope 1 without the need for any user input. Then the same sub_form named rope_2 would have all captions to have Rope 2 in them etc.
This can only currently be achieved by having multiple different subforms (created in the form builder).
-
Hi Everyone,
In our next android release 8.9 this feature is available as iformbuilder.formName https://iformbuilder.zendesk.com/hc/en-us/articles/360027972491-Android-Release-Notes-8-9
Join the Android Beta today to get early access to this functionality.
Thanks!
Please sign in to leave a comment.
Comments
13 comments