• 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: Can a drop-down list decide which fields to show?

Can a drop-down list decide which fields to show? 16 years 9 months ago #4019

Hi everyone,

I just got started with RSform!Pro and am really impressed with what it can do. Now I need your help in figuring out how to do something a little different.

I want to have a drop down list at the top of a form that will have two options, 'Individual' and 'Business'. I want the user's selection to determine what fields to display below. For example, if they select 'Business', then a business name field will appear, but if they select 'Individual' a first and last name field will appear.

I have no idea whether this can be done or not. Any ideas? Anyone already done it with a script or something?

Thanks,
Adam
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 9 months ago #4038

Bump....

Can anyone help me on this forum? I even submitted a ticket with no response. Is anyone home?
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 9 months ago #4040

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
Into your forms, add in additionnal attributes a :
onchange =\"javascript:calledmyfunction(my_list_result_insert_here)\"

Go to script display and add a javascript function who use getByelementid and visibility process.

Your answer is into javascript maybe. You have the way... :P
Component RS SHow Form in build
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 9 months ago #4041

Dragon, merci bien de votre aide. (sorry if that's wrong, it's been quite a few years since I studied French).

Adam
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 9 months ago #4043

  • richiep
  • richiep's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 131
dragonjc
Can you give us an example of what this JavaScript might look like?

Thanks
Richiep
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 9 months ago #4047

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
Into additional attributes of select list :
onchange=\"javascript:hidesection();\"

Into layout add
<div id=\"hidefirst\" style=\"display:none;\"> your part to hide </div>

Into script display :
$formlayout .= 'insert here the javascript code of your choice';

function hidesection() {

document.getElementById('hidefirst').style.display = \"none\";
}<br><br>Post edited by: dragonjc, at: 2008/08/10 08:27
Component RS SHow Form in build
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 8 months ago #4567

  • Luxx
  • Luxx's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I think i'm a noob, i don't understand dragonjc's sollution,

I understand that i need to add
onchange=\&quot;javascript:hidesection();\&quot;
here:


but where should I add other stuff?

Post edited by: Luxx, at: 2008/09/05 17:11<br><br>Post edited by: Luxx, at: 2008/09/05 17:12
Attachments:
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 7 months ago #4728

I am interested in the same, as Luxx is pointing out, where does this info need to go to make it work.?

Instead of a select box, I work with radio buttons.
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 6 months ago #5135

I'm looking arround more of three days without result.
i'm interesting about this function with drop-down menu, for example:

Dropdown1: select options
option1
option2
option3

Dropdown2: select options (this drop-down must apeer only if user select the option1 from Drop-down1)
option1a
option2a
option3a

Dropdown3: select options (this drop-down must apeer only if user select the option1a from Drop-down2)
option1aa
option2aa
option3aa

Dropdown4: select options (this drop-down must apeer only if user select the option2 from Drop-down1)
option1b
option2b
option3b
...and so on...

i'll appreciate if some body give us a valide example for new users who don't have javascripts knowlenght.

thanks<br><br>Post edited by: charalampos.vrochopoulos, at: 2008/10/19 10:21
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 6 months ago #5190

  • millend
  • millend's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Has anyone managed to get it working- I need the exact same thing as described....

And as with previous posters, I have very limited Javascript knowledge, so if possible, could someone please illustrate a working example based on the explanation in previous posts- would be much appreciated...

Thanks in advance... ;)
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 6 months ago #5207

  • GHluska
  • GHluska's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I hope you don't take this as being disrespectful, but you might want to forego the javascript and simply design two separate surveys, one for business users and another one for personal users. I banged out a really quick script to do something similar for a survey I'm designing. The script works well, but when I test it with Javascript turned off, the survey is all but useless. Frankly, I'd rather not offend my beta users by sending them a useless survey!!
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 6 months ago #5208

  • millend
  • millend's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
GHluska wrote:
I hope you don't take this as being disrespectful, but you might want to forego the javascript and simply design two separate surveys, one for business users and another one for personal users. I banged out a really quick script to do something similar for a survey I'm designing. The script works well, but when I test it with Javascript turned off, the survey is all but useless. Frankly, I'd rather not offend my beta users by sending them a useless survey!!

The thing is that I have som many variables to consider and it would be much userfriendly if it could all be in one form, however thank you for pointing that \"Javascript turned off\" thing out... You have a point there and it made me think twice about trying to find a solution for this, since it's going to be somewhat cruicial for the form to work as I will take registrations for Judo competitions and I if some entries are missed it is going to cause a huge problem later on...
So thnks and I will consider using separate forms for separate categories...

:P
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to sho 16 years 6 months ago #5209

  • millend
  • millend's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Sorry for the last post, I know it was not meant for me, since I did not start the thread... but I'll leave it there anyway... and thanks for the suggestion again...!

:)
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 6 months ago #5221

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello everyone,

This article in our knowledgebase is very similar to what you are trying to do:

www.rsjoomla.com/index.php/rsformpro.cus...-or-hide-fields.html
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 4 months ago #6104

  • Nuta
  • Nuta's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Did you solve this problem? The solution in last post doesn't work. :-((
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 3 months ago #6408

Hi everyone,

I have this working fine in IE but in Firefox it doesn't hide the parts of the form you want hidden. Apparently style="display: none" doesn't work in Firefox.

This is basically what I am using. Any ideas what could be changed to make it work in Firefox as well?

<script language="javascript">
function changeTab(currentTab,totalTabs)
{
  for (i=1;i<=totalTabs;i++){
    document.getElementById('tab'+i).style.display='none';
  }
  document.getElementById('tab'+currentTab).style.display='';
}
</script>
<table border="0"id="tab1">
<table border="0" id="tab2" style="display: none">


Help, anyone?

Thanks,
Adam
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 16 years 2 months ago #6565

  • proexe
  • proexe's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
Has anyone been able to solve this as I am looking to do a simular thing.

Thanks

Stewart Shram
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 15 years 2 weeks ago #10392

I'm looking for exactly what this posting originally asked -

dropdown1
option1
option2
option3

dropdown2 (used if user selects option1 only)
option1a
option1b
option1c

dropdown3 (used if user selectes option2 only)
option2a
option2b
option2c

etc

I realize creating a new form would work, but in this case I have to have everything on one form and it needs to function in this way per client.

I'm posting this because the link provided above is not found / deleted. Can you please repost this or provide some insight?

Thanks
Last Edit: 15 years 2 weeks ago by matt.bruno. Reason: needed to add info
The administrator has disabled public write access.

Re:Can a drop-down list decide which fields to show? 14 years 8 months ago #11158

alexp wrote:
Hello everyone,

This article in our knowledgebase is very similar to what you are trying to do:

www.rsjoomla.com/index.php/rsformpro.cus...-or-hide-fields.html

The link posted in this doesn't work. I am trying to do the same thing where the answer to one question will dynamically "reveal" another child question.

I have been trying to work with the documentation via www.rsjoomla.com/customer-support/docume...-or-hide-fields.html to make this work but I must be missing something as I cannot get an example of this to work.

One more thing....is this something that is easier to accomplish in RSForm Pro or will it work ok in RSForm? I ask as I only have RSForm.

I have submitted two trouble tickets on this matter and will report back once a viable solution is identified.

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