Jump to content
ababcock

Referencing A Virtual Field In A Submission Form Html Block

Recommended Posts

I have an HTML block in a submission form, and I'm trying to bring up some info based on the client selected. I created 10 virtual fields that use cascading dropdowns to retrieve this info. The virtual fields are hidden, and I am trying to show their results in an HTML block. Here is what I have come up with, but it's not showing the results on the deployed page. I checked the virtual fields, and they are bringing up the right information, so I must not be referencing it right in the HTML block. Does anyone know how to fix it? Thanks!!

 

<div style="background:#e9e9e9;width: 300px">
<b>Potential contacts:</b><br />
<b>Case Manager:</b> <script>document.getElementById("cbParamVirtual1")</script>
<b>Emergency Contact:</b> <script>document.getElementById("cbParamVirtual2")</script>
<b>Physician:</b> <script>document.getElementById("cbParamVirtual3&";)</script>
<b>Psychiatrist:</b> <script>document.getElementById("cbParamVirtual4")</script>
<b>Therapist:</b> <script>document.getElementById("cbParamVirtual5")</script>
<b>Advocate:</b> <script>document.getElementById("cbParamVirtual6")</script>
<b>Pharmacy:</b> <script>document.getElementById("cbParamVirtual7")</script>
<b>Employer:</b> <script>document.getElementById("cbParamVirtual8")</script>
<b>Payee:</b> <script>document.getElementById("cbParamVirtual9")</script>
<b>Guardian:</b> <script>document.getElementById("cbParamVirtual10")</script></div>

Share this post


Link to post
Share on other sites
document.getElementById('elementID').value;

"value" comes after the element is identified

 

value, innerHTML, style, onchange, etc. all come after the element is identified

 

EDIT:

I can't tell if you need javascript or not. If not...

<b>Case Manager: [@cbParamVirtual1]</p>
<b>Emergency Contact: [@cbParamVirtual2]</p>
If it's the same page obviously you know you need it, if it's two pages this example should work.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...