PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Populating a Form Field

  1. Gavin
    Member

    Hi, ok here is the situation. I have a form and I need to get the First Name, Last Name, etc on the next form. I want to populate the 2nd form from the value of the First Name and Last Name. Can you please tell me the steps to do it? I want the parameters to be send as $POST. Thanks!

    Posted 13 years ago on Thursday March 17, 2011 | Permalink
  2. Before I provide a solution for this, what are you using 2 forms for vs. 1?

    Also would a multi-page form solve your issue or would you still need to use 2 different forms?

    I ask because Gravity Forms v1.5 will have multi-page forms. But if it is necessary to use 2 forms and pass data from one to the other I can provide instructions on how to do this.

    Posted 13 years ago on Thursday March 17, 2011 | Permalink
  3. Gavin
    Member

    Alright, Actually it is a single form, but I used page break on it, so I guess it uses multi-page form. Page 1 has the First Name, Last Name, number, etc. then the second has other information then I need to display the First Name, Last Name, number, etc.

    Posted 13 years ago on Thursday March 17, 2011 | Permalink
  4. sonshine
    Member

    I'm look for a solution to this too. I have two forms created because I don't want form 1 to be too long and my user won't move the the next step. Form 1 captures their information for a referral program and sends notifications and form 2 is optional for them to enter up to 7 more names of friends they want to refer. My problem is that if form 2 is filled in with any information I don't have the name of the person who was entered in form 1.

    Sounds like v1.5 will solve this problem becuase a multi-page form is what I really need.

    Thanks for any help.

    Posted 13 years ago on Thursday March 17, 2011 | Permalink
  5. Gavin
    Member

    Hi, why didnt get back to me? Anyways, what are the parameters need in this method:

    add_filter("gform_field_value_service_city", "populate_service_city");
    	function populate_service_city(){
    	  global $post;
    	  $service_city = get_post_meta($post->ID, company_description, true);
    	  return $service_city;
    	}

    what are the parameters in add_filter()? is it add_filter("form name", "function name")?
    get_post_meta()? what is ID, what is company description and what is the boolean true in it?
    thank you very much.

    Posted 13 years ago on Sunday March 20, 2011 | Permalink
  6. @Gavin the code above is for pre-populating a field with post meta/custom field data. Is this what you are trying to do because your original description above was trying to populate a field in a multi-page form with the value of another field from a previous page. I would need clarification on what you are trying to do as those are 2 different things.

    Posted 13 years ago on Monday March 21, 2011 | Permalink

This topic has been resolved and has been closed to new replies.