MakenzieMiller-4396 avatar image
0 Votes"
MakenzieMiller-4396 asked DougRobbins-6392 answered

Need Help Understanding {IF {REF}} Fields and FORMTEXT.

I am needing help with a field code I have inserted and it not being editable once it is in restrict editing. I am very new to the world of coding and creating templates and fillable forms but continuously excited to learn more.
Currently I am trying to create a fillable form, that I eventually want to turn into a template, so that when emergencies occur, an already reliable form is ready to be filled. The problem I am having is that depending on a certain selection from a drop down list is selected, an additional information table appears that needs to be filled, but I can't seem to be able to do so.135857-capture1.png

^This is what the form looks like before an editing or selections.



^ And this is what is looks like when you view the field codes. (I know very clustered.)


^But for example, where we go. Once I have it in restricted editing (form fillable setting), I can't seem to understand what to add or change to make the newly additional table fillable.
As in the picture above, lets say we needed to report an injury. The correct incident type is selected and once tabbed out, the appropriate additional table appears. YAY! That is what I need. So, I continue with the next selections and begin filling the first page of the form. All is well and working!
I get to the VERY last section of the first page and hit the table button, hoping it will jump to the next table to fill in the details of the 'Injury/Illness' table. BUT NO! It continues onto the NEXT table of 'CPP Internal Reporting.'
I then decide to click the checkboxes, those work, but the areas where I have [FORMTEXT] so be able to add additional details, it doesn't work!

(I really hope all that I just explained, makes sense.)

I am trying to understand or figure out how to make the table that appears, depending on 'Incident Type' selection, relevant and editable. I keep looking at properties, settings, maybe finding a different way to insert these tables and so forth, with no answers!

Please help!

capture1.png (153.3 KiB)
capture2.png (228.3 KiB)
capture3.png (206.3 KiB)
capture4.png (176.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MakenzieMiller-4396,
Welcome to Q&A forum!
In order to better understand this issue, please provide a simple sample as much as possible.
Besides, I would also suggest you post a new quetion on the following forum for more professional support and help.
Microsoft Answers Community
Thanks for your understanding.

0 Votes 0 ·

1 Answer

DougRobbins-6392 avatar image
0 Votes"
DougRobbins-6392 answered

As you appear to be applying Protection for Filling in Forms, it is assumed that you are using Legacy FormFields and to achieve your aim you will need to:

  1. Select the part of the form that you want to be displayed based on the item selected from the Dropdown and identify it by adding a bookmark to the document (in the following code I used InfoForm as the bookmark

  2. Run a macro on exit from the Dropdown formfield containing code such as (replacing the "ShowInfoForm" with the item which, if selected in the Dropdown will display the additional part of the form.

With ActiveDocument
If .FormFields("DropDown1").Result = "ShowInfoForm" Then
.Bookmarks("InfoForm").Range.Font.Hidden = False
.Protect wdAllowOnlyFormFields, noreset
.Bookmarks("InfoForm").Range.Font.Hidden = True
.Protect wdAllowOnlyFormFields, noreset
End If
End With

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.