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.

Name field entry object

  1. I'm using gform_after_submission to update_post_meta but running into problems getting the First Name from a Normal Name field. In the sample below, $post_num and $taken are confirmed to be working properly. If I change the Name Field to simple, and use $entry["1"] it works but changing it to Normal and using this code does not. (I've also tried $entry["1,1"] with no luck.) I'm not sure what I'm doing incorrectly here?

    update_post_meta($post_num, 'roster_'.$taken.'_first_name' , $entry["1.1"]);

    Posted 11 years ago on Wednesday January 2, 2013 | Permalink
  2. If field 1 is your normal name field, then $entry['1.3'] will be the first name, and $entry['1.6'] will be the last name.

    You can always dump the $entry at the time of gform_after_submission to see what it contains. There you will see all the input IDs, including 1.3 for first name and 1.6 for last name.

    Posted 11 years ago on Wednesday January 2, 2013 | Permalink
  3. Chris,

    Thanks for the help. I just discovered the correlations via the Field Object page and came back here to say never mind. It might be helpful to make that connection on the Entry Object page in the Documentation for future reference.

    Posted 11 years ago on Wednesday January 2, 2013 | Permalink
  4. Thank you for the suggestion. Glad you figured it out.

    I updated the documentation:
    http://www.gravityhelp.com/documentation/page/Entry_Object#Usage

    Posted 11 years ago on Wednesday January 2, 2013 | Permalink