Hi All,
I have a form which sends Databound Form information to an email account, but if the user submits the form with no data they are getting a success message?! Really weird. I have pasted a modified version of my form script below, i would love to see if anyone can see something I've missed.
Any help would be greatly appreciated
I have a form which sends Databound Form information to an email account, but if the user submits the form with no data they are getting a success message?! Really weird. I have pasted a modified version of my form script below, i would love to see if anyone can see something I've missed.
- Code: Select all
<cms:if "<cms:get_flash 'submit_success' />" >
<div class="alert">
Success! Your application has been submitted.
</div>
</cms:if>
<cms:form
masterpage=k_template_name
mode='create'
enctype='multipart/form-data'
method='post'
anchor='0'
>
<cms:if k_success >
<cms:check_spam email=frm_email />
<cms:db_persist_form
_invalidate_cache='0'
_auto_title='1'
/>
<cms:pages masterpage=k_template_name id=k_last_insert_id show_future_entries='1'>
<cms:capture into='app_details' >
<!-- HTML Form Data to be emailed -->
</cms:capture>
<!-- SEND MAIL BEFORE REDIRECTING -->
<cms:send_mail html="1" from="no-reply@example.com" to="email@example.com.au" subject="New Application Received - <cms:show frm_first_name /> <cms:show frm_last_name /> >
You have received a new application. <br />
<cms:show app_details />
</cms:send_mail>
</cms:pages>
<cms:set_flash name='submit_success' value='1' />
<cms:redirect k_page_link />
</cms:if>
<cms:if k_error >
<div class="error">
<cms:each k_error >
<br><cms:show item />
</cms:each>
</div>
</cms:if>
Any help would be greatly appreciated