www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] copy previous text box array values

  1. #1
    Join Date
    Feb 2006
    Location
    india
    Posts
    678

    resolved [RESOLVED] copy previous text box array values

    Hi All,

    I am doing a form where after a certain row there is a checkbox which says "Same as above".So if it is clicked then after the form is submitted the 2nd element in the array will be populated by first element values.

    Here is the html code

    PHP Code:
     <input type="text" style="width: 300px;" label="Name" value="66" name="product[]">
     <
    input type="text" style="width: 300px;" label="Name" value="" name="domain[]">
     <
    input type="text" style="width: 300px;" label="Name" value="" name="ftp[]">


    ------------------------------------------------------------------
     <
    input type="text" style="width: 300px;" label="Name" value="68" name="product[]">
     <
    input type="text" style="width: 300px;" label="Name" value="" name="domain[]">
     <
    input type="text" style="width: 300px;" label="Name" value="" name="ftp[]">
    <
    input type="checkbox" name="sameasabove[]" value="1">
    -----------------------------------------------------------------
     <
    input type="text" style="width: 300px;" label="Name" value="69" name="product[]">
     <
    input type="text" style="width: 300px;" label="Name" value="" name="domain[]">
     <
    input type="text" style="width: 300px;" label="Name" value="" name="ftp[]">
    <
    input type="checkbox" name="sameasabove[]" value="1"
    So if the first checkbox(from 2nd row) is clicked it will copy all the data from first row...and so on.

    Is it possible....Please suggest me.

    Thanks a bunch.

    Raj

  2. #2
    Join Date
    Feb 2006
    Location
    india
    Posts
    678
    solved.. ..its a magic of array values

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles