I've created this template page, been trying to get custom subjects to the drop-down. Also how can I highlight the subjects of if i select main on the backend.
View page
on the front end I see the drop down like this. cant get the value to show on the drop down
- Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Inquiry Form'>
<cms:repeatable name="form" label="." order='1'>
<cms:editable name="subject" label="Subject" type="text"/>
<cms:editable name="type" type="dropdown" label="Type" opt_values='main=main | normal=normal'/>
</cms:repeatable>
</cms:template>
<?php COUCH::invoke(); ?>
View page
- Code: Select all
<cms:form method="post" class="form-inline">
<div class="gff-input col-md-3">
<cms:input type="text" name="name" class="form-control gff-input" id="nameInput" placeholder="Name" />
</div>
<div class="gff-input col-md-3">
<cms:input type="text" name="email" class="form-control gff-input" id="emailInput" placeholder="Email" />
</div>
<div class="gff-input col-md-3">
<cms:input type="text" name="phone" class="form-control gff-input" id="phoneInput" placeholder="Phone no." />
</div>
<div class="gff-input col-md-3">
<cms:pages masterpage='inquiry.php'>
<cms:input type="dropdown" name="subject" lable='Subject' class="form-control"
opt_values="<cms:get_custom_field 'form' masterpage='inquiry.php' />" style="width: 100% !important; border: 1px #3d9dfd solid;" />
</cms:pages>
</div>
<div class="clearfix"></div>
<div class="gff-textarea col-md-12" style="margin-bottom: 25px;">
<cms:input type='textarea' name="message" class="form-control" rows="3" style="width: 100%; border: 1px #3d9dfd solid;" placeholder="Write us"></cms:input>
<button type="submit" class="btn btn-default gff-send-btn">Send<span class="glyphicon glyphicon-arrow-up gff-glyph" aria-hidden="true"></span><cms:input name="submit" type="submit" class="couchbtn"/></button>
<cms:if k_success >
<h4>Thanks for your submission. We'll get back to you.</h4>
<cms:send_mail from='info@sender.com' to='reciever@gmail.com' subject='Inquiry from your site'>
The following is an email sent by a visitor to your site:
<cms:show k_success />
</cms:send_mail>
</cms:if>
</div>
</cms:form>
on the front end I see the drop down like this. cant get the value to show on the drop down