Hello KK,
I have a cloneable template: spaces.php, that has a relation field space_amenities.
I want to set the amenities for a cloned page at the front-end using a databound form and custom checkboxes.
My current code:
Everything works fine except the amenities do not persist to the database. What could I be doing wrong in my code?
Thank you
I have a cloneable template: spaces.php, that has a relation field space_amenities.
I want to set the amenities for a cloned page at the front-end using a databound form and custom checkboxes.
My current code:
- Code: Select all
...
<cms:db_persist_form
_invalidate_cache='0'
_auto_title='1'
space_amenities = frm_space_amenities
/>
...
<cms:hide>
<cms:input type="bound" name="space_amenities" />
</cms:hide>
<cms:pages masterpage="amenities.php" >
<div class="col-sm-6 col-md-4">
<div class="form-group">
<div class="checkbox amenity custom-checkbox">
<label>
<input name="f_space_amenities[]" type="checkbox" value="<cms:show k_page_id />"><cms:show icon /> <cms:show k_page_title />
</label>
</div>
</div>
</div>
</cms:pages>
...
Everything works fine except the amenities do not persist to the database. What could I be doing wrong in my code?
Thank you