I’ve got several webforms where I would like to hide file fields untill they are needed (that is, when the previous radio button is chosen as ‘Yes’).
At this moment I have a layout rule on a two optioned radiobutton ‘Yes’ and ‘No’ with default value blank. In case the user has not yet selected a radio button, I want the file field to be hidden. If he choses ‘Yes’ it needs to be shown and required, and if the user choses ‘No’ I need it to remain hidden.
I am able to insert rules which cause the field to (dis)appear depending on the ‘Yes’ or ‘No’, but I am unable to change the default of the file field into hidden while keeping the If>Yes rule in place. I’ve tried this with an if>’ ’ then hide field…, but this does not seems to be working when opening the webform using the link (works only after the user changes the value of another field in the webform)
Is there a way to hide a file field untill it is triggered by a layout rule?
Already tried it. This does not hide my file field by default. It only hides it whenever those rules are executed. I first have to trigger them by assigning a value in any of the fields of the web form. Then it starts to execute the command which you’ve just provided. Rather, I want it to automatically execute it by default upon opening the web form.
This means that the filefield is showed only if the radiobutton sleutels_nodig is answered with Yes. The rules are executed accordingly whenever the radiobutton is pressed as ‘Yes’ or ‘No’, but whenever it is not filled in, the file field is still shown
This seems to be working, partly. Upon running the webform the filefield is shown. However, now, if I assign a value to another radio button in my form, which has no rules in conjunction with sleutels_nodig, it executes the rules as you’ve said.
Which means that whenever click on a radio button, the filefield disappears. A rule must first be initiated by a click on a (random) radiobutton, it does not run on a just opened web form.