Skip to content

How to keep checkbox values on form validation. #3817

Answered by Barbapapazes
enxoco asked this question in Help
Discussion options

You must be logged in to vote

You can use in ? Edit : no

But you can use includes

- flashMessages.get('serveFrequency') === 'Twice a month' || flashMessages.get('serveFrequency[0]') === 'Twice a month' || flashMessages.get('serveFrequency[1]') === 'Twice a month'
+ flashMessages.get('serveFrequency').includes('Twice a month')

On why serveFrequencycould be a string or an array ? I think a use can choose only one, once a month OR twice a month, so maybe radio input could be better.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@enxoco
Comment options

@Barbapapazes
Comment options

@enxoco
Comment options

Answer selected by enxoco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants