lay Posted March 6, 2014 Share Posted March 6, 2014 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 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> Quote Link to comment https://forums.phpfreaks.com/topic/286748-conditional-fields/ Share on other sites More sharing options...
jairathnem Posted March 6, 2014 Share Posted March 6, 2014 Javascript will get this done. set the diplay : none for the text box on page load...when onfocus of the password field change the display property to block or something. Quote Link to comment https://forums.phpfreaks.com/topic/286748-conditional-fields/#findComment-1471610 Share on other sites More sharing options...
lay Posted March 6, 2014 Author Share Posted March 6, 2014 Thank you The thing is that i dont have any clue in javascript Is it possible to help me on that ? Kind regards, Lay Quote Link to comment https://forums.phpfreaks.com/topic/286748-conditional-fields/#findComment-1471616 Share on other sites More sharing options...
jairathnem Posted March 6, 2014 Share Posted March 6, 2014 <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. Quote Link to comment https://forums.phpfreaks.com/topic/286748-conditional-fields/#findComment-1471626 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.