Subject: RE: Web Survey with Rated Answers
First off, I apologize for not reading the word “web” in your subject; my response would probably have been a bit longer. (Then again, not necessarily; I tend to intially post a short response since the majority of posters never respond back to an answer.)
There are lots of ways to address developing this, from simple and somewhat clumsy to involved and prettier.
The least amount of work, but the poorest performance on the web, would be to use hide-whens as I indicated. More work might entail using some combination of javascript, tags, computed subforms, multiple forms, query_string parameters, dynamically-generated html, etc.
Since you’re a new developer, I’d suggest compromising between complexity and performance. One option along that line:
-
Enable “Refresh fields on keyword change” on the checkbox field. (It sounds like there’s only one of these. NOTE: This is the poor performance part; every click on the checkbox fires a post-and-reload round trip between browser and server.)
-
Add a hidden, computed for display number field (I’ll call it NumSelected) below the checkbox and above the dependent radio buttons which computes to @elements(CheckBoxFieldName). (Hidden fields on the web require that the form’s “Generate HTML for all fields” property be set.)
-
Each radio button field’s hide-when would then be similar to
(NumSelected != 3) | @isnotmember(“Relevant chkbox choice”; CheckBoxFieldName))
This will prevent any of the dependent radio button fields to display until 3 and only 3 are selected in the checkbox, and only those three chosen will display. (To prevent errors in aggregate data analysis later on, you’ll also probably want translation formulas for the radio button fields which look like
@if(@ismember(“Relevant chkbox choice”; CheckBoxFieldName); @ThisValue; “”)
This will clear any extraneous radio button field values the user enters before changing their mind about which ones to fill in after all. The downside of this is that unchecking and then re-checking a choice will cause that radio button to forget what you just chose in it.)
To lose the performance hit associated with enabling the checkbox field’s “Refresh fields…” property, there are a lot of more-involved options, but you might want to see if this works for you before delving into something more involved.