Expand my Community achievements bar.

SOLVED

Hidden text fields not showing when formed opened after saved

Avatar

Level 1

I developed an interactive form that asks users to provide an explanation if certain check boxes are checked. For example, if a user checks 'A', a text box (that is by default hidden) appears asking the user to explain their issue with 'A'. When the form is saved and emailed, the 'A' check box is checked, but the text box is hiddden. The end user is required to uncheck and then recheck the checkbox to show the text. I don't want the hidden text boxes to show in the original form, since there is no reason to have dedicated empty space if the user has no concerns to describe.

How can the hidden text fields show on a saved form that is now reopened? (I wrote code that in effect says 'hidden if unchecked, but visible if checked.' Since the check box is checked when opened after a save, it should open with the text field showing.)

Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Or ....have a look at the File/Form Properties/Defaultsand make sure that the radio button that sets the "Preserve Scripting Changes to Form when Saved" is set to Automatically.

Paul

View solution in original post

2 Replies

Avatar

Level 10

Probably you also need to copy the same code that you have written in the click event of the checkbox to the Initialize event of the

checkbox. That way when the form is opened, the initialize event will be fired and check for the checkbox value and then hide the textfield.

Thanks

Srini

Avatar

Correct answer by
Former Community Member

Or ....have a look at the File/Form Properties/Defaultsand make sure that the radio button that sets the "Preserve Scripting Changes to Form when Saved" is set to Automatically.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----