Reusable Elements and validity

I am hoping someone can point me to something simple I am missing. I have 4 places where I have to collect addresses for different types of things (users, customers, etc.) Since each thing had its own “create” page, I just created elements on each page for street address1, street address 2, city, state/province/region, zip/postal code and stored the data with the thing in question (user, customer, etc.)

Later, I decided to add country in and add some other custom validation so I decide it would be a good idea to make the whole “address block” a reusable element. I also moved all the address fields out of the individual tables and created an “address” table and put a defaultAddress field in the other tables that holds an address.

By and large it worked great. I replaced all the individual elements with a reusable element, and put all the saving logic in the element as well. It all works…except for one thing.

None of the fields in the reusable element, that are marked as “the input should not be empty” cause the workflow to evaluate as invalid like they did when they were just part of the page as individual elements. So now I have pages that just won’t submit (because the fields are invalid) yet, the end user sees now indication of what the problem is.

Does anyone know how to cause the sub-elements in reusable elements to work the same as normal elements on a page with regard to the automatic Bubble validation?

A little more information. I forgot to mention that as part of the reusable element I put in workflows for creating the address object and I call that from the page workflow the reusable element is in. It is great because it stops me from having to replicate the exact same code 4 or 5 times.

I would think that this would be the cause of my issue, because maybe the page don’t know about what is going on in the reusable element, but it clearly does, because it isn’t permitting the page workflow to run, yet it also isn’t triggering the is not valid condition on the elements.

This topic was automatically closed after 70 days. New replies are no longer allowed.