how to put condition inside repeater
In repeater i have a select field in that ->options() getting option valuses from one table, if i select a value and give add to items means, while selecting option in next the repeater that already selected value in first repeater wont show..
10 Replies
We're confused about what you mean by this question. Please read the #✅┊rules and reply to this message to provide more information about your use case.
I think what you are saying is you have a select list repeating and you only want to allow one option to be selected in all the repeating elements so if one is repeated you don't want to allow the first option to be selected again right?
yess...like that only..
here i selected tshirt small
in this tshirt small dont show again..remaining options need to show...
Due to the nature of repeaters and how it’s reusing the same select to render I don’t think that is going to be possible.
okayy..thank you..
You could use a custom validation on the repeater though to make sure all the selects values are unique. That would prevent it from saving.
i will try that one..
Yeah you will need a custom validation rule, it's the same as what I am in the process of doing.