Hello All!
I am having a relational field editable (with has='one').
Am unable to save its value in the DBF i am using.
Editable Field
where ncoal-commodity.php is a template which has values saved in k_page_title and no other editable region. The values from this are being fetched to the relation.
On the front end the following code is implemented, purposefully, so as to make the chained dropdown work.
When I select the value from the dropdown and hit save, the DBF saves but the selected value does not save.
I tried adding the editable name to the db_persist_form block, still not saving, code:
Though I am removed this above code.
Regards!
I am having a relational field editable (with has='one').
Am unable to save its value in the DBF i am using.
Editable Field
- Code: Select all
<cms:editable name="ncoal_cmdt" label="Commodity" type="relation" masterpage='ncoal-commodity.php' has="one" order="1" />
where ncoal-commodity.php is a template which has values saved in k_page_title and no other editable region. The values from this are being fetched to the relation.
On the front end the following code is implemented, purposefully, so as to make the chained dropdown work.
- Code: Select all
<cms:hide>
<cms:input name="ncoal_cmdt" type="bound" />
</cms:hide>
<select name="f_ncoal_cmdt" id="meal" class="gxcpl-input-text" onChange="changeCat(this.value);" style="width: 100%;">
<option value="" disabled selected>Select</option>
<cms:pages masterpage='ncoal-commodity.php'>
<option id="<cms:show k_page_id />" value="<cms:show k_page_title />"><cms:show k_page_title /></option>
</cms:pages>
</select>
When I select the value from the dropdown and hit save, the DBF saves but the selected value does not save.
I tried adding the editable name to the db_persist_form block, still not saving, code:
- Code: Select all
<cms:if k_success >
<cms:db_persist_form
_invalidate_cache='0'
_auto_title = '1'
ncoal_cmdt= "<cms:pages masterpage='ncoal-commodity.php' page_name='<cms:show frm_ncoal_cmdt />'><cms:show k_page_id /></cms:pages>"
/>
<cms:if k_success >
<cms:set_flash name='submit_success' value='1' />
<cms:redirect url="<cms:route_link 'create_ncoal' />" />
</cms:if>
</cms:if>
Though I am removed this above code.
Regards!