Thanks for your replies Calguy and for investigating this
OK, what I have understood of your suggestions is the ID in the hidden field which is part of the mact parameter should match the id part of the hidden field of the form parameter
i.e. the two IDs highlighted should be identical
whereas for comparison; the example Advanced Contact Form supplied with CGBF (with the intentional extraneous <foo> tag removed) - this forms works and the IDs are identical
So both of these hidden fields are generated by CGBF I have no direct control over them; but presumably something in either the CGBF settings for my form (pre render logic; validation; handlers; disposition) or more likely in the template is causing CGBF to generate mismatched IDs
Here is the template currently being used (all smarty has been removed except for error messaging; all styling/framework removed and as Calguy suggested all static text has been changed to use single quotes) - template is called APEMTP contact officials
Code: Select all
{cgbf_form_errors assign='errors'}
{if !empty($errors)}
<ul class='error'>
{foreach $errors as $err}
<li>{$err}</li>
{/foreach}
</ul>
{/if}
<form>
<fieldset>
<legend>Contact a Committee:</legend>
<div>
<label for='myname'>Your Name:</label>
<div>
<input id='myname' name='myname' value="{$form_data->myname}" disabled size='35'/>
</div>
</div>
<div>
<label for='myemail'>Your Email:</label>
<div>
<input id='myemail' type='email' name='email' value="{$form_data->email}" disabled size='35'/>
</div>
</div>
<div>
<label for='lot'>Lot #:</label>
<div>
<input id='lot' name='lot' value="{$form_data->lot}" disabled size='35'/>
</div>
</div>
<div>
<label for='phone'>Phone Number (nnn-nnn-nnnn):</label>
<div>
<input id='phone' type='text' name='phone' value="{$form_data->phone}" pattern="{literal}^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})${/literal}" size='35'/>
</div>
</div>
<div>
<p>Please contact me via:</p>
<div>
<label><input type='radio' name='contact_by' value='email' data-cgbf-label='Contact Via' data-cgbf-selected="{$form_data->contact_by|default:'email'}"/> Email</label><br />
<label><input type='radio' name='contact_by' value='phone' data-cgbf-selected="{$form_data->contact_by|default:'email'}"/> Phone</label>
</div>
</div>
<div>
<label for='dest' data-cgbf-label>Select the committee to send your message to:</label>
<div>
<select id='dest' name='dest' data-cgbf-required data-cgbf-selected='admin' multiple>
<option value='build' data-cgbf-human='Construction Committee'>Construction Committee - re. House Build</option>
<option value='admin' data-cgbf-human='Admin Committee'>Admin Committee - re. everything else</option>
</select>
</div>
</div>
<div>
<label for='comments'>Your Enquiry:</label>
<div>
<textarea id='comments' name='comments' data-cgbf-required rows='10' cols='27'>{$form_data->contents}</textarea>
</div>
</div>
<div>
<button type='reset'>Reset</button>
<button type='submit'>Submit</button>
</div>
</fieldset>
</form>
This scans cleanly by CGBF; and when CGBF renders the form at the front end HTML Validator does not find any errors or warnings; I've stared at the form for a while in a HTML editor with syntax highlighing and I can't see special characters that might trip up CGBF
Here is the source of the form as rendered in the front end
Code: Select all
<form method="post" action="http://www.apemtp.org/index.php?page=copy-of-form-test" enctype="multipart/form-data">
<fieldset><legend>Contact a Committee:</legend>
<div>
<label for="myname">Your Name:</label>
<div>
<input id="myname" name="myname" value="Phil SCOLTOCK & Heather FARRANT" disabled size="35"></div>
</div>
<div>
<label for="myemail">Your Email:</label>
<div>
<input id="myemail" type="email" name="email" value="philip.scoltock@gmail.com" disabled size="35"></div>
</div>
<div>
<label for="lot">Lot #:</label>
<div>
<input id="lot" name="lot" value="4-20" disabled size="35"></div>
</div>
<div>
<label for="phone">Phone Number (nnn-nnn-nnnn):</label>
<div>
<input id="phone" type="text" name="phone" value="" pattern="^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$" size="35"></div>
</div>
<div>
<p>Please contact me via:</p>
<div>
<label><input type="radio" name="contact_by" value="email" data-cgbf-label="Contact Via" data-cgbf-selected="email" checked> Email</label><br><label><input type="radio" name="contact_by" value="phone" data-cgbf-selected="email"> Phone</label>
</div>
</div>
<div>
<label for="dest" data-cgbf-label>Select the committee to send your message to:</label>
<div>
<select id="dest" name="dest[]" data-cgbf-required data-cgbf-selected="admin" multiple><option value="build" data-cgbf-human="Construction Committee">Construction Committee - re. House Build</option><option value="admin" data-cgbf-human="Admin Committee" selected>Admin Committee - re. everything else</option></select></div>
</div>
<div>
<label for="comments">Your Enquiry:</label>
<div>
<textarea id="comments" name="comments" data-cgbf-required rows="10" cols="27"></textarea></div>
</div>
<div>
<button type="reset">Reset</button>
<button type="submit">Submit</button>
</div>
</fieldset><input type="hidden" name="returnid" value="90"><input type="hidden" name="mcd06eform" value="APEMTPContactOfficials"><input type="hidden" name="mact" value="CGBetterForms,cntnt01,default,0&cntnt01returnid=1"><input type="hidden" name="__guid" value="3B9590FA-3308-4BD7-A9CD-D7A7E73E23DD"><input type="text" style="display: none;" name="__hpname" value=""></form>
In CGBF; it has the following settings
No validations rules set as yet
(The first handler is deactived - at the moment the only handler active is it (should) send the form respone to me via email)
And the page that uses it is simply
(I could probably move the feu_smarty::get's to the PreRenderLogic to simplify the page)
Given the Adv contact form works - I will copy the template and replicate its CGBF settings then mutate it towards my "Contact a Committee" form one tab at a time; then one field at a time to isolate what it is in the template or settings that is tripping up CGBF