Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    same input fields but 2 submits & 2 actions?

    Hey all,
    Ive seen people use 2 submits on 1 form. However my dilema is this. I have 2 forms, 2 submits, and 1 set of input fields. I need 2 forms because one is sent to my formail.php and the other is sent to paypal for online ordering. Both of the forms have there own submit button but is it possible for them to share fields?

    Echo

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Is there a reason you can't do things properly and have 2 seperate forms? What happens if the user has Javascript disabled?
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).

  • #3
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes there is.

    I have an option where people can buy a photo online. The buyer selects in which format framed ect.. This is all on the one page. If it wasnt on the same page I wouldnt have the photo number to submit to the order form. My only other option in this situation is to have a token or something. i.e. %photonumber% which a script reads and then puts the %photonumber% into 2 fields.

  • #4
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Echostorm
    My only other option in this situation is to have a token or something. i.e. %photonumber% which a script reads and then puts the %photonumber% into 2 fields.
    If both forms need that variable that's exactly what you should be doing.
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).


  •  

    Posting Permissions

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