How to use form element in a 'Data - where' clause

linque

Member
I would like to use a form element value in a 'Data - where' clause in an other element.

For exemple :
Element_1 is a dropdown
Element_2
Data - where : table.field = $this->getFormModel()->data['Element_1']
 
Sorry, I don't understand how to use it.

The following is working :
upload_2022-5-25_22-28-25.png

Where I have to use placeholders to replace "Demo91" by the value of 'champid'
upload_2022-5-25_22-30-19.png
 
Not sure what you are trying, you are showing a list's filter block, not a form.

Do you want to "preset" the filter? Changeable by the user (e.g. via URL filter) or "fix" (Pre-filter)?
http://fabrikar.com/forums/index.php?wiki/filtering-lists-tables/

The syntax for element placeholders (element value in the record you are just on) is {your-full-element-name}, but it doesn't make sense to set the Data-where to do filtering. You may use "Filter where" (but no element placeholder here), see the tooltips.
http://fabrikar.com/forums/index.php?wiki/placeholders/
 
Yes, it's a list's filter block, sorry...
In that list filter block :
'champ ed' depend on 'champid'
'champ edcat' depend on 'champid' and 'champ ed'
 
sorry, I understand nothing.
what solution do you propose ?

upload_2022-5-30_22-52-36.png

For 'champ ed' depending on 'champid', I use 'cascadingdropdown' and it works well.
For 'champ edcat' depending on 'champid' and 'champ ed', what do you propose ?

upload_2022-5-30_22-47-57.png

I've tried several things like an other 'cascadingdropdown' or this :
upload_2022-5-30_22-49-44.png

or other things but nothing is working.

Do you have an idea ?
 
Cascading dropdown element doesn't have a Data- where.

Databasejoin's Data-where needs SQL, not php (but not needed here at all, it's only to restrict the dbjoin options).

If you want your filter elements to show only options depending on the selection of the "parent" you need
1. champid dbjoin
2. champ_ed CDD watching 1 (so showing only options depending on the selection of champid)
3. champ_edcat CDD watching 2 (so showing only options depending on the selection of champ_ed)

No Data-where etc needed.
Make sure to set up your CDDs correctly.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top