Hi all -Sorry about the vague title. I’m a little unsure how to describe what I am trying to do.
I have four text inputs that I would like to concatenate in a fifth input field. This part is easy. However, I also want to be able to concatenate the value of a check box.
I want the user to be able to check any number of boxes and then generate concatenated text strings for each of the checkboxes checked.
- Input 1+Input2+input3+input4+checkboxA
- Input 1+Input2+input3+input4+checkboxB
- Input 1+Input2+input3+input4+checkboxC
- Input 1+Input2+input3+input4+checkboxD
So, if there are 10 checkboxes, and the user checks boxes A, C, D, and G, four text strings will be generated each with the four text inputs, plus the value of one of the checkboxes selected.
I hope this makes sense. Does anybody know a way to achieve this?
Thanks in advance!
I would use a set state to store the checkbox data as a list of texts until you are ready to add them together. Then you will be able to say
Hope that helps!
For All Your No-Code Education Needs:
- One-on-One Tutoring
- eLearning Hub
- Video Tutorials
- No-Code Classes
Hi - thanks for the suggestion. I thought about using custom states, but I couldn’t work out how to store the value of the checkbox (label) in a custom state. It only wants to store the boolean value.
If I have three checkboxes: □ 300x250; □ 728x90; □160x600 and the user selects two, I want to eventually generate two concatenated strings:
Input 1+Input2+input3+input4+300x250; Input 1+Input2+input3+input4+728x90
If the user selected three, thee strings etc.
Do you know how I can put the label value in a custom state?
I decided to use the MultiSelect Plugin, which has solved some of my problems, and raised some others.
Yeah. So with the checkbox option you can do a ‘when this input is changed’ then set the state to add ‘some text’ to the set state. Just type in the text you want instead of using dynamic data. Does that make sense?