I'm setting up an email contact form for a page, it's working fine for logged in users, but for non logged users, they get the message:
A valid sender email is required
I'm sure it's the {member_email} field that's causing it, it's obviously not picking up the field if your not logged in. Does anybody know a way to use this form without the {member_email} field, or a way to fill this field for someone whos not logged in?
{exp:email:contact_form user_recipients="no" replyto="yes" recipients="[email protected]" charset="utf-8"}
<h2>Register</h2>
<p>
<label for="name">Your Name:</label><br />
<input type="text" name="required[]" size="40" />
</p>
<p>
<label for="institution">Institution/Organisation</label><br />
<input type="text" id="Institution" name="required[]" size="40" placeholder="institution/organisation" />
</p>
<p>
<label for="number">Contact Number</label><br />
<input type="text" id="number" name="required[]" size="40" placeholder="contact number" />
</p>
<p>
<label for="email">Email Address</label><br />
<input {if logged_in} value="{member_email}"{/if} {if logged_out} type="text" value=""{/if} id="from" name="from" size="40" />
</p>
<p>
<input type="text" id="subject" name="subject" size="40" value="Contact Form" style="display:none;"/>
<textarea type="hidden" id="message" name="message" rows="18" cols="40" placeholder="Register" style="display:none;">
Sent on: {current_time format="%l %mF %Y"}
</textarea>
</p>
<p>
<input name="submit" type='submit' value='Register' />
</p>
{/exp:email:contact_form}