• 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: Need to hide somme fields, when the form opening

Need to hide somme fields, when the form opening 14 years 7 months ago #8696

Hello everybody

I need to hide somme fields, when the form opening,
i have tryed this :http://www.rsjoomla.com/customer-support/documentations/34-custom-scripting/93-show-or-hide-fields.html


In my form, i need when i check radio button, the field show, if dont check
no swhow.

thanks a lot

sorry for my english..
The administrator has disabled public write access.

Re:Need to hide somme fields, when the form opening 14 years 7 months ago #8700

  • matt
  • matt's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 136
  • Thank you received: 14
Hi!

It works fine to hide components doing according to the documentation. But you say you have more than one field to hide. In that case you, it worked for me to put the fields to hide in a separate table and add - id="hide" - to the new table tag.

Good luck!

Matt
The administrator has disabled public write access.

Re:Need to hide somme fields, when the form opening 14 years 7 months ago #8704

Hello everybody,
thanks your quick reply.

I think, i give you a bad explain, sorry...

I need this

www.sexyrun.com/form/try.html


this is my script:

<script type="text/javascript">
function displayField()
{
if(document.getElementsByName('form[Radio]')[0].checked)
document.getElementById('hide').style.display="none";

if(document.getElementsByName('form[Radio]')[1].checked)
document.getElementById('hide').style.display="";
}
</script>


<div class="componentheading">{global:formtitle}</div>
<table border="0">
<tr>
<td>{Radio:caption} (*)</td>
<td>{Radio:body}<div class="formClr"></div>{Radio:validation}</td>
<td>{Radio:description}</td>
</tr>
<tr id="hide">

<td>{Evenement particulier:caption} (*)</td>
<td>{Evenement particulier:body}<div class="formClr"></div>{Evenement particulier:validation}</td>
<td>{Evenement particulier:description}</td>
</tr>
<tr>
<td>{Envoyer:caption}</td>
<td>{Envoyer:body}<div class="formClr"></div>{Envoyer:validation}</td>
<td>{Envoyer:description}</td>
</tr>
</table>
<script type="text/javascript">
displayField();
</script>



thanks a lot for your help.
The administrator has disabled public write access.

Re:Need to hide somme fields, when the form opening 14 years 7 months ago #8708

  • matt
  • matt's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 136
  • Thank you received: 14
Hi!

I think your code looks fine, you have not forgot to add this code
Additional Attributes:
onclick="displayField();"
to the radio component?

Matt
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!