Forum Academy Marketplace Showcase Pricing Features

Use repeating group as input value

I am trying to make a form where someone adding an item would choose a category for that item.
Currently, I have a repeating group displaying the different categories to choose from. but I can’t figure out how to make the choice from the repeating group be that value for the input in that form.

Set a custom state somewhere when the item is clicked - with the value being the current cell’s thing (or you can use a Group, and Display data to do the same thing).

Then just refer to that value in your form.

If you have a RG displaying the different categories, you would have a cell inside the RG row(s). You would typically put a check box so a user can select multiple options…

So, create a custom state on the page called ‘selectedChoice’ and make that a list of choices. Then when someone clicks the checkbox the workflow would be make changes to page’s selectedChoice - make the value page's selectedChoice: plus item: current cells selectedChoice. You can set it to ‘uncheck’ as well so let me know if you need help with that.

What if the user is just selecting just one category? Can I have it set to where the user clicks on one the text of one of the repeating groups choices? I have watched a few videos and I honestly am having trouble understanding the concept of custom states. That’s making it difficult for me to define them. I do appreciate the assistance though guys

This is what it’s looking like so far if this helps to visualize

What would be the custom states Type?

Yes. Are you familiar with how custom states work?

You don’t need another person in this thread, but I have to ask… why wouldn’t you display the categories in a dropdown element? Why are you using a repeating group?

I know I could try that way. The only thing with that is that I wanted to have an option for the user to add a new category right in the dropdown if the item being added did not fit the current ones.

Yes… I just explained how to do exactly that in my previous post.

I honestly am not. I have been trying to watch videos to gain an understanding.

I will code something up and post a link in a bit.

Thank you

Well, for what it’s worth, you can still use a dropdown element, and you wouldn’t have to mess with custom states (not that you shouldn’t learn what they are and how to use them, of course).

You could have the first item in the Category data type have a label of something like Add Category. Then, add a workflow event that says when an input’s (the dropdown’s) value is changed and the input’s value’s label is Add Category, show the popup to add a new category.


1 Like

See page called ‘selections’

Thank you very much Mike. I think I’m doing to try and build this out. Though, I really would love to understand custom states better. If you have any good learning resources, I’d appreciate any direction

It couldn’t hurt to start by checking out this video and this video.

1 Like

@mikeloc solution is a great one, but if you need the user to select multiple (check box) choices, as in the example I gave, you will need custom states.