Jump to content

Fill multiple textfields


synted

Recommended Posts

I need to write some code so when pressing a button i will fill multiple textfields in a page automaticly based on some requests. For example i would like to file the first 5 textfields with the letter a the next two with the letter b and the next 5 with the letter c.

 

Any ideas?

Link to comment
Share on other sites

something like...

 

<form method="post" action="">

<input type="text" name="whatever" value="<?=var1?>" />

<input type="submit" name="submit" />

</form>

 

At the top of the page do something like:

 

if(isset($_POST['submit']))

{

    $var1 = 'a';

}

 

In the form above the value for the input text field will be filled in with the 'a' from $var1.

Link to comment
Share on other sites

Thank you for that. Now i want to make it more complex. I have some persons. Lets say 2. NameA and NameB. I have a monthly plan for them and which hours they can work. I have their requests for the shifts that they can not work. So i want to use the fill button for both of them on a monthly view so it can fill my database with the days and shifts they can work.

 

Is it possible? I am stuck and can't think anything to help me move on.

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.