Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I have a template which contains
editable of type 'dropdown'
editable of type 'relation' with has='one' (perfectly showing as dropdown in admin panel)

the issue is that when using data-bound form of the type bound with respect to these above dropdowns, classes are not added to the DOM in respect of editable type 'relation'. In other words attribute 'class' or 'id' is not added to the final html.

example template:
Code: Select all
<cms:template title='ABCD'  clonable='1' routable='1'>

<cms:editable  name="xyz"  opt_values=' Option1 | Option2 | Option3 | Option4 '   type='dropdown' />

<cms:editable  name='pqr'  type='relation'   has='one'   masterpage='lmn.php'   />


example databound form:

Code: Select all
<cms:input name="xyz" class="form-control" type="bound" />
<cms:input name="pqr" class="form-control" type="bound" />

the issue is that class="form-control" is getting added to first (xyz) input but not added to another (pqr).
can someone shed some light on this issue?

Another question:
can we change the first option (--select--) set by relation databound form dropdown to something else?

Solved using javascript/jquery:

add class with jquery as follows:

$('#f_editable_name option:contains("-- Select --")').text('Select Category');

change bold text with editable's name (prefix with _f).

:D :D
2 posts Page 1 of 1