The GeoDirectory contact form sends the message to the listing owner through a merge tag, {GD:listing_email}, which GeoDirectory fills with the Email field of the listing the form was sent from. If the owner’s copy is not arriving, one of the pieces below is usually missing. The setup itself is in Ninja Forms.
How the form finds the listing
When you create a form in Ninja Forms from the GeoDirectory Contact Form template, it includes:
- a hidden field with the key
listing_idand the default value{wp:post_id}, which records which listing the visitor was on - an Email Notification action with To set to
{GD:listing_email}and Reply To set to{field:email} - an Email Confirmation action that sends a copy to the visitor
The template also marks the form as a GeoDirectory contact form. A form you build from scratch with the same fields does not get that, so always start from the template.
What to check
- The form was created from the GeoDirectory Contact Form template, and the hidden Listing ID field is still there with the key
listing_id. - The Email Notification action is switched on and its To field is
{GD:listing_email}. - The listing has a value in its Email field, and that field is visible for the listing’s price package.
- The form is shown on the listing through the GD > Ninja Forms block or widget, so it knows which listing it belongs to. GD > Ninja Forms covers its settings, including Post Contact form, which hides the button when the listing has no email.
Seeing {wp:post_id} come through as 0 in a notification email does not mean the form is broken. The form is submitted in the background, where there is no current post, so GeoDirectory reads the listing from the hidden Listing ID field instead.
If everything looks right
If the visitor’s confirmation arrives and the owner’s does not, the message may be leaving your site and getting filtered on the way. An email log plugin shows whether WordPress sent it and to which address. See Email Log plugin.