Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I am creating a booking form, all things are are as per the tutorials (actually i could not find a difference), but the form does not submit.

Here are my editable regions:
Code: Select all
<cms:editable name='name' label='Name' required='1' type='text' />
    <cms:editable name='email' label='Email' required='1' validator='email' type='text' />
    <cms:editable name='guest' label='No. of Guests' required='1' type='dropdown' opt_values=' No. of Guests=- | 1 | 2 | 3 | 4 | 5 | >5' />
    <cms:editable type='datetime' name='check_in' label='Check In Date' />
    <cms:editable type='datetime' name='check_out' label='Check Out Date' />   
    <cms:editable name='room' label='Room Type' required='1' type='dropdown' opt_values=' Room Type=- | Single Room | Double Room | Triple Room | Elegant Room' />
    <cms:editable name='message' label='Message' required='1' type='textarea' />


and my Form Code:
Code: Select all
<div class="contact_form_holder">
                           <cms:set submit_success="<cms:get_flash 'submit_success' />" />
                            <cms:if submit_success >
                                <h4>Success: Your application has been submitted.</h4>
                            </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: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>
                               
                                <div class="col-md-4">
                                    <cms:input type="bound" class="form-control" name="name" id="name" placeholder="Your Name" />
                                    <!--<div id="error_name" class="error">Please check your email</div>-->
                                </div>
   
                                <div class="col-md-4">
                                    <cms:input type="bound" class="form-control" name="email" id="email" placeholder="Your Email *" />
                                    <!--<div id="error_email" class="error">Please check your email</div>-->
                                </div>
   
                                <div class="col-md-4">
                                    <cms:input type="bound" name="guest" id="guest" opt_values="<cms:show guest />" class='form-control' />
                                    <!--div id="error_guest" class="error">Please select no. of guests</div>-->
                                </div>
                                <div class="col-md-4">
                                    <cms:input
                                        type='datetime'
                                        name='check_in'
                                    />
                                    <!--<div id="error_checkin_date" class="error">Please select CheckIn date.</div>-->
                                </div>
   
                                <div class="col-md-4">
                                    <cms:input
                                        type='datetime'
                                        name='check_out'
                                    />
                                    <!--<div id="error_checkout_date" class="error">Please select CheckOut date.</div>-->
                                </div>
   
                                <div class="col-md-4">
                                    <cms:input class='form-control' type="bound" name="room" id="room" opt_values="<cms:show room />"  />
                                    <!--<div id="error_room" class="error">Please select room type</div>-->
                                </div>
   
   
   
                                <div class="col-md-12">
                                    <cms:input type='bound' cols="10" rows="8" name="message" id="message" class="form-control" placeholder="Any Messages?"></cms:input>
                                   
   
                            <cms:if '<cms:not submit_success />' >
                                    <p id="btnsubmit">
                                        <button type="submit" class="btn btn-primary" />Confirm Booking</button>
                                    </p>
                                    </cms:if>
                                </div>
                            </cms:form>
                        </div>
Image
where innovation meets technology
@All...

Bump... Bump... Bump...
Image
where innovation meets technology
Hello all… anyone, anything on this non submission… not implementing at all…
Image
where innovation meets technology
Hi Aashish,

Apologies for the delay.

I tried the code you posted and it is working perfectly fine for me (was able to submit and persist submissions from the front-end).

So probably the problem lies somewhere else on the template.
I am posting the full working template code below and you can start with it and then add other elements to see at what point things break -
Code: Select all
<?php require_once('couch/cms.php'); ?>
<cms:template title='Website' order='1' clonable='1'>

    <cms:editable name='name' label='Name' required='1' type='text' />
    <cms:editable name='email' label='Email' required='1' validator='email' type='text' />
    <cms:editable name='guest' label='No. of Guests' required='1' type='dropdown' opt_values=' No. of Guests=- | 1 | 2 | 3 | 4 | 5 | >5' />
    <cms:editable type='datetime' name='check_in' label='Check In Date' />
    <cms:editable type='datetime' name='check_out' label='Check Out Date' />   
    <cms:editable name='room' label='Room Type' required='1' type='dropdown' opt_values=' Room Type=- | Single Room | Double Room | Triple Room | Elegant Room' />
    <cms:editable name='message' label='Message' required='1' type='textarea' />

</cms:template>
<!DOCTYPE HTML>
<html>
   <body>

      <div class="contact_form_holder">
           <cms:set submit_success="<cms:get_flash 'submit_success' />" />
            <cms:if submit_success >
                <h4>Success: Your application has been submitted.</h4>
            </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: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>
               
                <div class="col-md-4">
                    <cms:input type="bound" class="form-control" name="name" id="name" placeholder="Your Name" />
                    <!--<div id="error_name" class="error">Please check your email</div>-->
                </div>

                <div class="col-md-4">
                    <cms:input type="bound" class="form-control" name="email" id="email" placeholder="Your Email *" />
                    <!--<div id="error_email" class="error">Please check your email</div>-->
                </div>

                <div class="col-md-4">
                    <cms:input type="bound" name="guest" id="guest" opt_values="<cms:show guest />" class='form-control' />
                    <!--div id="error_guest" class="error">Please select no. of guests</div>-->
                </div>
                <div class="col-md-4">
                    <cms:input
                        type='datetime'
                        name='check_in'
                    />
                    <!--<div id="error_checkin_date" class="error">Please select CheckIn date.</div>-->
                </div>

                <div class="col-md-4">
                    <cms:input
                        type='datetime'
                        name='check_out'
                    />
                    <!--<div id="error_checkout_date" class="error">Please select CheckOut date.</div>-->
                </div>

                <div class="col-md-4">
                    <cms:input class='form-control' type="bound" name="room" id="room" opt_values="<cms:show room />"  />
                    <!--<div id="error_room" class="error">Please select room type</div>-->
                </div>



                <div class="col-md-12">
                    <cms:input type='bound' cols="10" rows="8" name="message" id="message" class="form-control" placeholder="Any Messages?"></cms:input>
                   

            <cms:if '<cms:not submit_success />' >
                    <p id="btnsubmit">
                        <button type="submit" class="btn btn-primary" />Confirm Booking</button>
                    </p>
                    </cms:if>
                </div>
            </cms:form>
        </div>

   </body>
</html>
<?php COUCH::invoke(); ?>

Hope it helps.
*Post removed* question in a other post.
Check your js files on your template...precisely jquery.min.js
I commented it out and now it works :D

However it's ruined my styling :cry:
Le blocage des artГЁres coronaires, de la prostate et est associГ© au des propriГ©tГ©s Г©lectriques des cellules musculaires lisses du dГ©trusor.
6 posts Page 1 of 1
cron