Advanced Search

Search by Keyword
Search by User Name
   

Search Options

Find Posts from
Sort Results by
Jump to Result Number
Search in Categories

Search Results

Searched for: show hide
19 Nov 2008 09:45

octavian

Hello,

Read the whole topic; I've explained that you need to use the
style=\"display: none\"
additional attribute on the field you need to hide.

Regarding hiding 2 or more fields:
The getElementById function expects only one parameter, that's why it doesn't work.
Go to the Form Layout tab, disable the autogenerate form layout feature and paste this code at the bottom:
<script type=\"text/javascript\">
function hide_all(what)
{
 if (what.value == 'Other')
 {...
...
Category: RSForm!
19 Nov 2008 09:22

masgian

What if we need it hidden as initial state?
Category: RSForm!
17 Nov 2008 16:28

nespresso

this is a great feature.

quick question, How can I hide two textfields, instead of just one?

I've tried the following but i doesn't work:

onclick=\"if (this.value == 'Other') document.getElementById('field','field2').style.display = ''; else
document.getElementById('field','field2').style.display = 'none';\"
Category: RSForm!
16 Nov 2008 19:03

nyree

I can do this with 2 radio buttons as in the tutorial, but does anyone know how to show / hide fields using 4 or more radio buttons?

any help gratefully recieved!!:S
Category: RSForm!
14 Nov 2008 20:37

adamevans

works great! One last thing....how do I hide the field caption (text to left of field)?
Category: RSForm!
14 Nov 2008 20:24

adamevans

thx for your help Strafe.
Category: RSForm!
14 Nov 2008 20:23

octavian

Do exactly what I've described in my post. Read it step by step, but instead of a radiogroup use a dropdown. I'll edit my post so it says dropdown.
Category: RSForm!
14 Nov 2008 20:20

adamevans

Any additional attributes required?
Category: RSForm!
14 Nov 2008 20:18

octavian

Sorry, I've mistaken - but if you want to use a dropdown, the solution stays the same.
Category: RSForm!
14 Nov 2008 20:10

adamevans

Strafe,

Sorry about the confusion, I don't think I was clear. I have a dropdown list\"

option1
option 2
option 3
option 4 (this is my other option)

If I pick option 4 from the list I need the text field to appear. Thanks for your patience, I'm pulling my hair out here!
Category: RSForm!
14 Nov 2008 19:59

octavian

Let me explain.
You have your dropdown with several options (items). Let's say these are the items:
High school graduate
College graduate
Other
This dropdown has the following additional attribute:
onclick=\"if (this.value == 'Other') document.getElementById('field').style.display = ''; else document.getElementById('field').style.display = 'none';\"

What I've done is I made a form field called \"field\" show up when the \"Other\" option is clicked. However,...
Category: RSForm!
14 Nov 2008 19:51

adamevans

Strafe, thanks for the reply.

Not quite sure I understand...I need to create a hidden radio box to achieve what I need? My thinking was selecting an item from the dropdown list and based on my selection have the text field appear below the dropdown for additional details.
Category: RSForm!
14 Nov 2008 19:37

octavian

Hello,

If you setup a dropdown with an item in the items list named exactly \"Other\", on the additional attributes insert this code:
onclick=\"if (this.value == 'Other') document.getElementById('field').style.display = ''; else document.getElementById('field').style.display = 'none';\"

Remember to replace \"field\" with the name of the field you want to hide, and use this additional attribute so the field won't show up when the form displays:...
 
<br><br>Post...
Category: RSForm!
14 Nov 2008 19:21

octavian

Hello,

It's simple - use this for multiple fields:
if(document.getElementsByName('form[Radio]')[0].checked)
{
document.getElementById('hrs1').style.display=\&quot;none\&quot;;
document.getElementById('hrs2').style.display=\&quot;none\&quot;;
document.getElementById('hrs3').style.display=\&quot;none\&quot;;
document.getElementById('hrsn').style.display=\&quot;none\&quot;;
}
 
if(document.getElementsByName('form[Radio]')[1].checked)
{...

You can use as many fields as you want. Just...
Category: RSForm!
14 Nov 2008 19:12

nyree

Hi
I have successfully used the tutorial to show hide SINGLE fields, but I can't work out how to hide show MULTIPLE fields from the same radio button
this is the script I am using:

if(document.getElementsByName('form[Radio]')[0].checked)
document.getElementById('hrs1').style.display=\&quot;none\&quot;;

if(document.getElementsByName('form[Radio]')[1].checked)
document.getElementById('hrs1').style.display=\&quot;\&quot;;

Does anyone have any suggestions??

Many thanks
Nyree:(
Category: RSForm!
Displaying 376 - 390 out of 404 results.