I thought I was on the right path. I have a drop-down with seven options. Here is what I need: If they select RFA (value 4) then "textfield14" becomes visible. If they select any of the other choices then "table5" becomes visible and "textfield14" goes hidden. My current formula is on the right track but if I select RFA and "textfield14" shows but then I choose another option, the "textfield14" does not hide again. Thoughts?
TextField14.presence = "visible"
elseif (DropDownList1==1 or 2 or 3 or 5 or 6 or 7) then
I received your form. I did a quick mock-up and included working FormCalc code in your drop box field.
As I surmised, your code actually worked, to a degree. Generally, in hide/display events, you need to include both elements in each if/then condition statement in order to ensure that if a user hits the wrong entry, then corrects, both fields are not visible..
Other items for consideration:
You used tables repeatedly to display text fields. Tables are more problematic to work with; in my example, I just used text boxes, wrapped in sub-forms.
Table are generally used only when: (1) you want to add specifically defined table rows (or perform some other math); or (2) when you need to invoke the instance manager and have your table expand rows. Otherwise, using fields and sub-forms is much easier.
In your hierarchy, you have not named all fields. This could result in a two fields having the same name.
Generally, only collect only one data element per field (e.g., I separated PM/CM from phone).
You can uses flowed and positioned sub-forms to ensure that when text fields are set to expand, the expanded field doesn't overflow onto the other objects lower in your form. When using flowed sub-forms, you will also need to set your page to "flowed" for the object to work properly. I have done this in the example (note: setting a page to flow can have substantial unintended consequences in your layout - always save your form before you set page to flowed to enable you to go back). Wrapping other elements of your form in sub-forms, and setting that property to "Positioned" will help minimize this happenstance.
I have assume your checkboxes represent mutually exclusive selections; in such instances, use a radio group which will prevent multiple selections. Use checkboxes if multiple selections are OK. You can make a radio group look like a checkbox with formatting properties.
Normally if you use tables to display text fields, you drag a text field to a table row. the caption to the text field will disappear. The caption (or question) is normally placed in a table header row (you can set table rows to be either a header row or body row). See my example on page.
I put that in and it did not work. I am thinking because my form has a subform and it's messy. I did try to add in the additional layers to the presence lines but it still didn't work. Take a look at the picture and let me know what you think. Is there not FormCalc for this?
If you select the first or second selection in the dropdown, the table will appear. If you select the 4th choice, the textbox will appear. If you select the third option, nothing will happen.