Boxswitch top profile box
Welcome, Guest
Please Login or Register.    Lost Password?
Conditional Elements - Docs No Help (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC:

Conditional Elements - Docs No Help

#9700
Conditional Elements - Docs No Help 6 Months, 3 Weeks ago  
I've looked over the RSForm Pro documentation on showing hidden fields (www.rsjoomla.com/customer-support/docume...-or-hide-fields.html) but I am not familiar with PHP and this code by itself, does not work. I'm assuming there needs to be some input on my side, any help would be appreciated.

I have added (per the documentation) this script in the form layout:
<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>

I also added onclick="displayField();" to the Additional Attributes of the radio button that I wish to trigger the hidden fields.

Then I added the <tr id="hide" to the five conditions I wish to become visible upon selecting the radio button.

What am I missing? Do I need to input the field names of the hidden values I want to make visable? If so, where?
brandon.scivolette (User)
brandon.scivolette user's avatar
Fresh Boarder
Rank
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#9705
Re:Conditional Elements - Docs No Help 6 Months, 3 Weeks ago  
Make a new table (html) for all components you want to hide. Add the id="hide" to the new table instead of a row. This made it work for me. I guess you have checked your code so it is working.

Matt
matt (User)
matt user's avatar
Senior Boarder
Rank
Posts: 79
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#9706
Re:Conditional Elements - Docs No Help 6 Months, 3 Weeks ago  
Thanks Matt, I'll try that tomorrow. Did you use the script provided in the docs, and if so, was it ok on it's own or did you have to apply any changes to it?
brandon.scivolette (User)
brandon.scivolette user's avatar
Fresh Boarder
Rank
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#9707
Re:Conditional Elements - Docs No Help 6 Months, 3 Weeks ago  
I used the script from RSJoomla documentation.

Matt
matt (User)
matt user's avatar
Senior Boarder
Rank
Posts: 79
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#9711
Re:Conditional Elements - Docs No Help 6 Months, 3 Weeks ago  
Okay Matt. I tried separating the table and using the id=hide like so:

*Non-hidden elements above
</table>
<table id="hide">
*hidden elements below

Did not work. Is that the correct application of the "hide" attribute to the table or did I do it wrong?
brandon.scivolette (User)
brandon.scivolette user's avatar
Fresh Boarder
Rank
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#9717
Re:Conditional Elements - Docs No Help 6 Months, 3 Weeks ago  
OK, I'm close! I finally was able to get the fields to hide but my last problem: I don't want the fields to be displayed unless the radio is selected. Currently, the fields are displayed and when checked it hides. The script I used is below and {2nd Location} is the radio option that triggers the hide.

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

if(document.getElementsByName('form[2nd Location]'[1].checked)
document.getElementById('hide'.style.display="none";
}
</script>
brandon.scivolette (User)
brandon.scivolette user's avatar
Fresh Boarder
Rank
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
The administrator has disabled public write access.  
#9717
Re:Conditional Elements - Docs No Help 1 Minute ago  
Hello,
This is an automatically generated message.
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 wish to receive our 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: http://www.rsjoomla.com/support-policy.html.

Thank You!
PLEASE NOTE: This topic is NOT locked and you can add replies to it. Other users are free to reply as well. This message has been generated by a bot and has no effect on the topic whatsoever.
rsjoomlasupport (User)
rsjoomlasupport user's avatar
Gold Boarder
Rank
Posts: 0
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
 
The administrator has disabled public write access.  
Go to top
get the latest posts directly to your desktop