kraftbj / genesis-enews-extended

WordPress widget to provide additional functionality to the Genesis eNews widget.
https://kraft.blog/genesis-enews-extended/
Other
12 stars 15 forks source link

Aweber Form and Genesis eNews Extended Plugin - Required Fields Are Missing and the Solution. #155

Open Fr0udy opened 2 years ago

Fr0udy commented 2 years ago

I don't use Wordpress day to day, but got asked a question to see if I could help..fixed the problem but thought be nice to share the knowledge. They created a form in Aweber and wanted to to use with this plugin.

Their form had email, first name, last name on it. But they were getting an error message on the Form submission using this plugin.

error-message-required-fields-are-missing

Steps I took - created a simple form (see screenshot below) in Aweber after registering doing the bare-minimum.

Screenshot 2022-03-03 at 21 10 43

Saved it and went to Step 2 (Settings), then to Step 3 (Publish)

Step 3 - I want to install the Form myself with Raw HTML Version

Screenshot 2022-03-03 at 21 16 08

Found this line in the raw HTML - seemingly looking like some form fields that need to be sent.

<input type="hidden" name="meta_required" value="name (awf_first),name (awf_last),email" />

Searched for "name (awf_first)" seems to be the First name related for the form found a line like below.

<div class="af-element">
<label class="previewLabel" for="awf_field-xxxxxxxxxx-first">First Name:</label>
<div class="af-textWrap">
<input id="awf_field-xxxxxxxxxx-first" type="text" class="text" name="name (awf_first)" value=""  onfocus=" if (this.value == '') { this.value = ''; }" onblur="if (this.value == '') { this.value='';} " tabindex="500" />
</div>
<div class="af-clear"></div>
</div>

Searched for "name (awf_last)" seems to be the Last name related for the form found a line like below.

<div class="af-element">
<label class="previewLabel" for="awf_field-xxxxxxxxxx-last">Last Name:</label>
<div class="af-textWrap">
<input id="awf_field-xxxxxxxxxx-last" class="text" type="text" name="name (awf_last)" value=""  onfocus=" if (this.value == '') { this.value = ''; }" onblur="if (this.value == '') { this.value='';} " tabindex="501" />
</div>
<div class="af-clear"></div></div>

Searched for "email" seems to be the email related for the form found a line like below.

<div class="af-element">
<label class="previewLabel" for=awf_field-xxxxxxxxxx">Email: </label>
<div class="af-textWrap"><input class="text" id="awf_field-xxxxxxxxxx" type="text" name="email" value="" tabindex="502" onfocus=" if (this.value == '') { this.value = ''; }" onblur="if (this.value == '') { this.value='';} " />
</div><div class="af-clear"></div>
</div>

Then went back into Wordpress found the Widget for Genesis - eNews Extended

Updated the E-mail field with "email" <- enter it without the double quotes.

Updated the First Name field with "name (awf_first)" <- enter it without the double quotes.

Updated the Last Name field with "name (awf_last)" <- enter it without the double quotes.

Should like similar to screenshot below.

Screenshot 2022-03-03 at 21 30 29

Updated / Saved the widget.

Went again to complete the form and this time...I got...

Screenshot 2022-03-03 at 21 34 35

Job done. Sent them the updated fields to use and hey presto, happy days.

As I said, I don't use Wordpress day-to-day but fancied a bit of 10 minute breather. Hopefully this might help someone else out.