• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Help hiding HTML elements created with RSForm Pro

Help hiding HTML elements created with RSForm Pro 13 years 9 months ago #14008

Hi guys,

I have a requirement to hide some HTML elements when a user selects an entry from a dropdown list. The javascript function that does it looks like this:


function editForm() {


if (document.getElementById('List').value != 'Test') {


var elem = document.getElementById('userForm').elements;

for (var i = 2; i < elem.length; i++ ) {

elem.style.display = 'none';

}

}
}

This code fragment does the job correctly but for the fact that the corresponding HTML labels remain visible. In order to fix this, i decided to surround the HTML form elements within a DIV element as you can see below.

<div id="tableRow">

<tr class="rsform-block rsform-block-name">
<td>{Spec:caption}</td>
<td>{Spec:body}<div class="formClr"></div>{Spec:validation}</td>
<td>{Spec:description}</td>

<td>{Len1:caption}</td>
<td>{Len1:body}<div class="formClr"></div>{Len1:validation}</td>
<td>{Len1:description}</td>

<td>{Len2:caption}</td>
<td>{Len2:body}<div class="formClr"></div>{Len2:validation}</td>
<td>{Len2:description}</td>

</tr>
</div>

So basically, i'm now trying to use the id "tableRow" of the div element to hide everything within it. Unfortunately, this workaround still doesn't solve the problem. I'd be very grateful if some can help me.

Thanks in advance.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!