Jump to content

making input field appear and disappear


php_novice2007

Recommended Posts

Hi,

 

I'm writing a page which allows someone to reset their password. I have 2 text fields for them to type in the new password 2 times. I want to have a check box above them so that when the user clicks on the check box, these two fields appear, otherwise they should be hidden.

 

How can I go about doing this? I can't seem to find any tutorial on how this can be done either..

 

thanks

Link to comment
Share on other sites

ok, there is a javascript function to reload() the screen and this you can start by making onclick event for your check box, then you make use of if-then statement to verify that when the checkbox is selectect you display the fields. this fields will be displayed inside your if-then statement, i.e

 

if ($_POST["chkMe"])

{

 

  display your text fields here...

}

 

I hope u do understand what I'm saying,

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.