Jump to content

Conditional fields


lay

Recommended Posts

Good morning guys, 

first of all i discovered this form recently and i can say that it s very very usefull, so thanks a lot !

 

Well, let me explain you my problem.

 

i have a joomla website

www.hireasean.com

 

i have created with a module call RSFORM a registration form 

i have 5 fields

 

Name

I want to be

Email

Password
 

(see the picture )

 

I would like to reveil the password field only when the email field is filled up..

 

can someone help me ?? 

 

i would be very very thank full

 

my very best regards

 

Lay

 

 

 1.jpg

This is the HTML code

 

<fieldset class="formFieldset">
{error}
<!-- Do not remove this ID, it is used to identify the page so that the pagination script can work correctly -->
<ol class="formContainer" id="rsform_5_page_0">
<li class="rsform-block rsform-block-name">
<div class="formCaption2">{name:caption}</div>
<div class="formBody">{name:body}<span class="formClr">{name:validation}</span></div>
<div class="formDescription">{name:description}</div>
</li>
<li class="rsform-block rsform-block-want">
<div class="formCaption2">{want:caption}<strong class="formRequired"></strong></div>
<div class="formBody">{want:body}<span class="formClr">{want:validation}</span></div>
<div class="formDescription">{want:description}</div>
</li>
<li class="rsform-block rsform-block-email">
<div class="formCaption2">{email:caption}<strong class="formRequired"></strong></div>
<div class="formBody">{email:body}<span class="formClr">{email:validation}</span></div>
<div class="formDescription">{email:description}</div>
</li>
<li class="rsform-block rsform-block-password">
<div class="formCaption2">{password:caption}</div>
<div class="formBody">{password:body}<span class="formClr">{password:validation}</span></div>
<div class="formDescription">{password:description}</div>
</li>
<li class="rsform-block rsform-block-send-my-request">
<div class="formCaption2">{Send my request:caption}</div>
<div class="formBody">{Send my request:body}<span class="formClr">{Send my request:validation}</span></div>
<div class="formDescription">{Send my request:description}</div>
</li>
</ol>
</fieldset>
 
 
 

 

Link to comment
https://forums.phpfreaks.com/topic/286748-conditional-fields/
Share on other sites

<html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
    $('#txt1').on('click', function() {
        $('#txt2').show();
    });
});

</script>
<input type="text" id = "txt1" />
<input type="text" id="txt2" style="display:none;" />
</html>

may not be the best optimized. refine it.

Link to comment
https://forums.phpfreaks.com/topic/286748-conditional-fields/#findComment-1471626
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.