Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You will require some javascript code to display other fields when a specific value is selected in combo box. I have used simple javacript code so that everyone can understand it quickly.</p> <p>First add the other fileds within the table and hide them with style property display:none</p> <pre><code> &lt;tr id="other_fields" style="display:none"&gt; &lt;td&gt;Other Fields&lt;/td&gt; &lt;td&gt; &lt;input type="text" value="field1"/&gt; &lt;input type="text" value="field2"/&gt; &lt;input type="text" value="field3"/&gt; &lt;input type="text" value="field4"/&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>I have assigned this row an id other_fields, so in onchange event if the value matches with the required one then we will show it otherwise hide it.</p> <p>Secondly, Add the following javascript function and call it in on load function. This will attach an ebent handler to this select box.</p> <pre><code>&lt;script type="text/javascript"&gt; function onload() { document.getElementById("CallLeadType").onchange = function (e) { if (this.value == 'Transfer from EE Agent') { document.getElementById("other_fields").style.display=""; } else { document.getElementById("other_fields").style.display="none"; } }; } &lt;/script&gt; </code></pre> <p>Finally in body tag call this function:</p> <pre><code>&lt;body onload="onload()"&gt; </code></pre> <p>See the working example at:</p> <blockquote> <p><a href="http://jsfiddle.net/YpVGE/1/" rel="nofollow">http://jsfiddle.net/YpVGE/1/</a></p> </blockquote> <p>Hope this helps</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload