• Resolved UgoDimma

    (@lovecoinz)


    Hey

    I have a form that permits one to populate a field with dynamic contents either from the page or from else where.
    How can I get the current property price, agent name, agent id, email, and phone number. But most importantly, the property price.

    For this to be done, the form field allows hook, Query string and/or shortcode as seen on this picture ==> https://nimb.ws/4DTikI

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author g5theme

    (@g5theme)

    Hi, sorry but to be honest, i don’t understand what you want here. Please explain more, may be i can find a solution.
    Thanks

    Thread Starter UgoDimma

    (@lovecoinz)

    Thanks for your response.

    In other to make it more clearer, I currently use gravity forms, while creating fields on the form, I can use a short code like {user:user_email} to automatically populate the field for the user that is logged in, as you can see on the form settings here https://nimb.ws/HzPSop, which I also did for post/page id.
    Now at the front end, once the user loads the page that contains the forms as seen here https://nimb.ws/2pXwcS, those fields will automatically be filled for the user. This is also available for other forms, other than gravity forms.

    But in addition to that, gravity forms provides option to also auto fill the form with short code other than the one they provided as shown here https://nimb.ws/4DTikI.

    So my concern now is, is there any short code that I can use to grab the property price of the current property and then use it to auto populate the form for the user.

    Thread Starter UgoDimma

    (@lovecoinz)

    Resolved.

    For those that needs to know my solution, specific for gravity forms, this is what I did…

    add_filter( 'gform_field_value_price', 'populate_property_price' );
    
    function populate_property_price(){
    global $post;
    $property_id=get_the_ID();
    $property_meta_data = get_post_custom($property_id);
    $price = isset($property_meta_data[ERE_METABOX_PREFIX . 'property_price']) ? $property_meta_data[ERE_METABOX_PREFIX . 'property_price'][0] : '';
    return $price;
    }

    Now on the form field where I want to auto populate the price
    https://nimb.ws/kRY9f3

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Populating forms with property price and other informations’ is closed to new replies.