Merge tags in Ninja Forms are not pulling listing data

This topic contains 12 replies, has 3 voices, and was last updated by  Alex Rollin 5 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #478935

    Luca
    Expired Member
    Post count: 23

    After setting up Ninja Forms on the Listing details tab, the forms are unable to pull listing data. When a visitor completes a response form, form submission confirmation emails are being sent to the visitor, but not the listing author.

    To troubleshoot I set an additional form action to send an email to my admin account with every merge tag listed on https://ninjaforms.com/docs/merge-tags/ and “User” fields populated correctly, but “Post” info did not. “Post ID” was “0”, and all other “Post” fields were blank.

    I’m guessing the “{wp:post_id}” tag in the hidden “Listing ID” field isn’t working properly, but I don’t know how to fix it… Does it have to be something different for custom post type listings? Could the data transfer from V1 to V2 be causing the problem? Any other ideas?

    Thanks

    #478936

    Luca
    Expired Member
    Post count: 23

    (forgot to check notify of follow up, doing so now)

    #478940

    Alex Rollin
    Moderator
    Post count: 27815

    I will flag your question for the developers to let us know.

    #478942

    Luca
    Expired Member
    Post count: 23

    Thank you!
    Looking into it more, the {wp:post_id} tag does seem to be pulling up the correct post ID number… so it might be “{GD:listing_email}” that’s not working?

    #478943

    Alex Rollin
    Moderator
    Post count: 27815

    To use the integration, short of additional merge tags, try this doc:
    https://wpgeodirectory.com/docs-v2/integrations/ninja-forms/

    #478951

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Luca,

    Did u create the NF using the GD contact form template? It has hidden things that make it send to the contact author, things you can’t recreate if you create a new form not using the template.

    Stiofan

    #478953

    Luca
    Expired Member
    Post count: 23

    I’d really appreciate some developer feedback because:
    1) I followed the directions in your link to the letter
    2) The widget for the sidebar button has the checkbox option marked to only display the button if the listing email is populated, and it IS displaying the button, so it must be correctly verifying the email at *some* point.
    3) The contact form is displaying correctly, and successfully sending out confirmation emails to Admin and to User after form submission
    4) Emails to Listing Author are NOT being sent, and as far as I can tell that’s because the {GD:listing_email} merge tag is not pulling any data. I verified this by setting up a form action to send an admin notification with all relevant info, and the {GD:listing_email} tag is not showing any data.

    Thanks again!

    #478954

    Luca
    Expired Member
    Post count: 23

    Hi Stiofan, I typed the last message before seeing your response. Yes, I used the template. I even tried a completely unmodified form generated with that template, and a test listing created by me, and still the emails are not being sent to listing author.

    #478958

    Luca
    Expired Member
    Post count: 23

    One other thing: the {wp:post_id} tag correctly pulls the ID# on the frontend (tested by adding a field to the form which would display it) but shows a value of “0” if used in an email.

    #478976

    Alex Rollin
    Moderator
    Post count: 27815

    Is your custom field key ’email’?
    If you are still having trouble making it work please share WP Admin in a private reply and we will check the settings during normal support hours.

    #478983

    Luca
    Expired Member
    Post count: 23

    Yes, the custom field key is “email”.
    I’m still unable to get it to work, so additional help would be greatly appreciated.

    Can you please let me know what your normal support hours would be in EST and what country would need access, so I can disable the site’s location-based firewall accordingly?

    Thanks

    #479042

    Luca
    Expired Member
    Post count: 23

    UPDATE: I solved it, in a roundabout way.
    I think somewhere either GeoDirectory or Ninja Forms is resetting the wp post or querry data.

    I kept testing the form out with an additional Action to send myself an email with all the data being processed. In those emails:
    Listing ID: {field:listing_id} – showed the correct post ID
    WP Post ID: {wp:post_id} – showed “0”

    Since the hidden Listing ID field is just populated with a default value of {wp:post_id} something, somewhere, is resetting the post_id. I didn’t have time to track it down, but PLEASE look into this because I imagine it must be affecting other functionality as well in ways I’m simply not noticing yet.

    My solution for getting listing author notification emails to send out correctly was to add a hidden Author Email field with a default value set to {wp:post_author_email} and modify the Email Notification action to send to the corresponding field key {field:author_email_hidden}

    So far this is working perfectly. Hidden form fields are pulling the correct post data, and using merge tags that reference the form fields is producing the desired result. However, I’d still love to know why/where the post id is being reset to 0, in case it ends up causing other problems.

    I wasted three days on this and I’m pretty frustrated, but hopefully this helps someone else out.

    #479110

    Alex Rollin
    Moderator
    Post count: 27815

    If there is an issue with the integration please include WP Admin (and FTP ) in a private reply and we will take a look.

    Thanks

Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket