Custom States and Only Sending Data When Visible

Hey all, doing a lot of research on Custom States and how/when to use them. Wanted to ask to make sure I’m headed in the right direction.

  • I have 4 different groups (representing amounts of invoice options) that have several inputs (percentages and currency amounts). See the 1st image below.
  • When a user selects which group (invoice option) they want, it opens up to several inputs (percentages and currency amounts) See the 2nd image below.
  • Once they fill it out and go to the next step in my process I ONLY want to send that data from that group to another page.

So the idea is to only send data that is in a group that is visible.

I know how to send data to another page (I’m already doing this) through referencing what’s been saved in the database… but in this instance, I only want to send data that the user is currently allowing to be visible. Make sense?

Are Custom States the best way to do this?

Would the “Custom State” be applied to the group that is housing the 4 different Invoice options (see 1st picture)?

Would I then apply “Conditions” to each group that is housing the input data for each Invoice option (see 2nd image)?

For those researching custom states, watch these videos by @dan1. These videos have been super helpful.

I’m still trying to understand…

how to tell a button on one page to set (or trigger?) the custom state on another page.

Still digging, still learning. If you have any insight, let me know!

Custom states don’t persist across pages. You’ll need to use a database value, or a parameter in the URL that the item on the second page reads from.


@andrewgassen ah ok… I wasn’t seeing anything that said they couldn’t persist across pages so I appreciate your response. Huge help man! Thanks.

In case you want a clean URL, you can use the plugin Browser Storage.

@andrewgassen do you have any insight into what I’m doing wrong? I know how to save content on Page #1 to a Thing that is saved in the database (been doing this already in other areas of the site) and I have the custom states working on my Page #2.

I’m wanting a particular button (“4 Payments” for example on Page #1, see the images 1-3) to set a state and then have it saved to the database so that Page #2 can point to it and be affected (in this case, visible vs invisible, see pics 4-5). Where the disconnect is happening is my custom state on Page #2 that is pointing to the database and not being affected. I’m also not sure where to point the “data source” in the final image that is located on Page #2.