3 Replies - 405 Views - Last Post: 27 September 2012 - 04:38 AM Rate Topic: -----

#1 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Sending form data to another form

Posted 27 September 2012 - 03:46 AM

Hi guys. Not sure what language should be used for this, so please move if appropiate. I have a feeling I need either php or JQuery. Basically, I have a form. The user may start filling out this form and then come across a link like so
<a href="#popup-box" class="popup-window">Advanced Form</a>


What this basically does is bring up (in a modal window with a darkened background) an advance version of the form. If they do this after they have typed some information into the basic version, I want to transfer what they had typed over to the advanced form. As this is a link and not a submit action, I may have to use Ajax or JQuery, not to sure though.

Any ideas of how I can retrieve this data in the advanced form?

Cheers

Nick

Is This A Good Question/Topic? 0
  • +

Replies To: Sending form data to another form

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1002
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Sending form data to another form

Posted 27 September 2012 - 03:58 AM

On the event handler that pops up the dialog why not just copy your form values across from the "basic" form into the "advanced" form's fields?
Was This Post Helpful? 1
  • +
  • -

#3 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Sending form data to another form

Posted 27 September 2012 - 04:32 AM

Sorry, I think this may become non php related, but say my basic form has a field called depart, did you mean to do something like this in the advanced form?
<input type="text" placeholder="From" class="job_selector" name="popup[]" autocomplete="off" value="$(depart.val())"/>


The above dont seem to work, but I presume you mean something along them lines, or something like this using php?
Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1002
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: Sending form data to another form

Posted 27 September 2012 - 04:38 AM

You would have to do it on the event handler of that link for the popup window. You can't set Javascript as the value of a form.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1