Hi all,
I'm working on Databound form for the one my project. So when I submit the form the entry of it comes into the admin panel but I did not receive the mail for the same. following is my code which I have used for the form: (Do I have to submit authentication details? If yes where should I put those details)
I think this is the first time I have tried using databound forms, is this maybe the problem?
Or am I missing something stupid? (this is often the case, just need someone else to look at it and tell me what is wrong!)
I'm working on Databound form for the one my project. So when I submit the form the entry of it comes into the admin panel but I did not receive the mail for the same. following is my code which I have used for the form: (Do I have to submit authentication details? If yes where should I put those details)
- Code: Select all
<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:if k_success >
<cms:set_flash name='submit_success' value='1' />
<cms:redirect k_page_link />
</cms:if>
<!-- EMAIL SUBMITTED DATA HERE -->
<cms:send_mail from='test@gmail.com' to='frm_email' subject='Simple Databound Form' debug='1'>
Thank you for your enquiry, <cms:show first_name />.
Here is the mail summary:
Email ID: <cms:show frm_email /></br>
Portfolio Website: <cms:show frm_portfolio /></br>
Applying For: <cms:show frm_position /></br>
Salary Requirements: <cms:show frm_salary /></br>
Resume: <cms:show_securefile 'frm_resume' >
<cms:if file_is_image >
<a href="<cms:cloak_url link=file_id />"><img src="<cms:cloak_url link=file_id thumbnail='1' />" /></a><br />
<cms:show file_name /> (<cms:size_format file_size />)
<cms:else />
<a href="<cms:cloak_url link=file_id />"><cms:show frm_resume /></a> (<cms:size_format file_size />)
</cms:if>
</cms:show_securefile>
</cms:send_mail>
<!-- -->
</cms:if>
<cms:if k_error >
<div class="alert alert-danger"><strong>Error:</strong>
<cms:each k_error >
<br><cms:show item />
</cms:each>
</div>
</cms:if>
<div class="form-group <cms:if k_error_first_name || k_error_last_name >has-error</cms:if>">
<label class="control-label" for="first-name">Name <span class="required">*</span></label>
<div class="row">
<div class="col-xs-6">
<cms:input class="form-control" id="first-name" name="first_name" placeholder="First" type="bound" value="" />
</div>
<div class="col-xs-6">
<cms:input class="form-control" id="last-name" name="last_name" placeholder="Last" type="bound" value="" />
</div>
</div>
</div>
<div class="form-group <cms:if k_error_email >has-error</cms:if>">
<label class="control-label" for="email">Email Address <span class="required">*</span></label>
<cms:input class="form-control" id="email" name="email" type="bound" value="" />
</div>
<div class="form-group <cms:if k_error_portfolio >has-error</cms:if>">
<label class="control-label" for="portfolio">Portfolio Website</label>
<cms:input class="form-control" id="portfolio" name="portfolio" type="bound" placeholder="http://" />
</div>
<div class="form-group <cms:if k_error_position >has-error</cms:if>">
<label class="control-label" for="position">Which position are you applying for? <span class="required">*</span></label>
<cms:input type='bound' class="form-control" id="position" name="position" />
</div>
<div class="form-group <cms:if k_error_salary >has-error</cms:if>">
<label class="control-label" for="salary">Salary Requirements</label>
<div class="row">
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">$</span>
<cms:input class="form-control" id="salary" name="salary" type="bound" value="" />
</div>
</div>
</div>
</div>
<div class="form-group <cms:if k_error_resume >has-error</cms:if>">
<label class="control-label" for="resume">Attach a Copy of Your Resume <span class="required">*</span></label>
<cms:input id="resume" name="resume" type="bound" />
<p class="help-block">Word or PDF Documents Only</p>
</div>
<div class="form-group <cms:if k_error_human >has-error</cms:if>">
<label class="control-label" for="human">What colour is a blue apple? (4 characters required)</label>
<cms:input class="form-control" id="human" name="human" type="text" required='1' validator='regex=/^blue$/i' />
</div>
<cms:if "<cms:not submit_success />" >
<button class="btn btn-primary" type="submit">Submit Application</button>
</cms:if>
</cms:form>
I think this is the first time I have tried using databound forms, is this maybe the problem?
Or am I missing something stupid? (this is often the case, just need someone else to look at it and tell me what is wrong!)