editor fields
editor fields
aimeric
Posts: 5Questions: 2Answers: 0
hi,
i've a field type "select" in index.php, with leftjoin in staff.php and i've limit dropdown list where id == 2.
if you have a solution. thx.
code:
fields: [
{
label: "Presta:",
name: "exp_add.Presta",
type: "select",
placeholder: "Selection Presta",
def: function ( data ) {
if (data == 2){
return data;
}
}
}
]
This discussion has been closed.
Answers
I'm afraid I'm not entirely certain what your question is.
If you are using the Editor PHP or .NET libraries then there are options that can be used to provide conditions for the options to show in the list, and also to limit their length - that documentation is available here.
Allan
Hi,
How to put a condition on the rolling list?
thx
The documentation I linked to includes information about the
Where()
method of theOptions
class which can be used to add a condition to the list of options to be shown in theselect
element,which is what I presume you mean by "rolling list".Allan
Yes,
i use
->where( 'exp_presta.Zone',$idZone,'=')
in staff.php but my select is complete.
thx
Do you also add that to the
Options
class. e.g. this is the example in the documentation I linked to:Allan