Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How can I add a page conditionally?

bscivolette1
Level 2
Level 2

Good Morning,

I am trying to find a way to conditionally add a page to my form. I have attempted to create this as a result of an 'action' but have been unsuccessful in locating the correct action.

To summarize, I am trying to add a separate page to my existing form containing instructions when a specific checkbox is selected. The seperate page is text only and does not have any form/field inputs. Is there a relatively simple way to accomplish this task?

1 Accepted Solution
whyisthisme
Correct answer by
Level 7
Level 7

You can enter the code in the script editor. If you don't have it showing you can get it by pressing (on a PC) Ctrl+Shift+F5.

View solution in original post

0 Replies
whyisthisme
Level 7
Level 7

you could just have the page there but set to hidden and then when the checkbox is checked it is set to visible. You could put something like this in the change event of the checkbox (in formcalc):

if ($ == 1) then

otherpage.presence = "visible"

else otherpage.presence = "hidden"

endif

bscivolette1
Level 2
Level 2

Awesome! Thanks for the input, I will try that out.

bscivolette1
Level 2
Level 2

I hate to ask (what I imagine) are stupid questions, but I'm not really sure how to go about entering the script you offered. I was originally thinking that I would find a place to put the script in the object properties (Field, Value or Binding), but I don't see an appropriate place. Is this something I should enter directly as XML? I didn't see any options for how the form handles the change event either.

I appreciate your time and response.

whyisthisme
Correct answer by
Level 7
Level 7

You can enter the code in the script editor. If you don't have it showing you can get it by pressing (on a PC) Ctrl+Shift+F5.

View solution in original post

bscivolette1
Level 2
Level 2

Wow, I never knew that was there! Thank you for the advice, I appreciate it.