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.

get address field value

  1. elinet
    Member

    Hi,
    i'm developing a script as suggested after the "gform_pre_submission" hook.
    How can i take the value of an address field in the form?

    I thought like this:

    $_POST['input_124']=$_POST['input_51.1'];
    $_POST['input_127']=$_POST['input_51.3'];
    $_POST['input_126']=$_POST['input_51.4'];
    $_POST['input_125']=$_POST['input_51.5'];

    but don't work...

    <label class='gfield_label' for='input_6_50_1'>Indirizzo<span class='gfield_required'>*</span></label><div class='ginput_complex ginput_container' id='input_6_50'><span class='ginput_full' id='input_6_50_1_container'><input type='text' name='input_50.1' id='input_6_50_1' value='' tabindex='89' /><label for='input_6_50_1' id='input_6_50_1_label'>Via/Piazza + numero civico</label></span><span class='ginput_left' id='input_6_50_3_container'><input type='text' name='input_50.3' id='input_6_50_3' value='' tabindex='90' /><label for='input_6_50_3' id='input_6_50.3_label'>Località</label></span><span class='ginput_right' id='input_6_50_4_container' ><input type='text' name='input_50.4' id='input_6_50_4' value='' tabindex='92' /><label for='input_6_50_4' id='input_6_50_4_label'>Provincia</label></span><span class='ginput_left' id='input_6_50_5_container'><input type='text' name='input_50.5' id='input_6_50_5' value='' tabindex='93' /><label for='input_6_50_5' id='input_6_50_5_label'>C.A.P.</label>

    i post the generated html from the form...

    Help :)

    Marco

    Posted 7 years ago on Friday June 8, 2012 | Permalink
  2. elinet
    Member

    ... Perhaps it solves:

    $_POST['input_124']=$_POST['input_51_1'];
    $_POST['input_127']=$_POST['input_51_3'];
    $_POST['input_126']=$_POST['input_51_4'];
    $_POST['input_125']=$_POST['input_51_5'];

    using the underline as the dot?

    Posted 7 years ago on Friday June 8, 2012 | Permalink