Skip to main content
← Data, API & Backend
Data, API & Backend September 14, 2022 · 1 reply

Set a related ID during Item creation from a checkbox grid?

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

I have created items with relations to categories, spaces, locations, and main-image IDs, which are each represented by their respective images fieds for each of their corresponding IDs.

Once an item has been created, I can view it, load a modal when clicked and then from the modal use the check function to modify the existing id with the new one that was checked. 

https://video.cwdynamic.com/conversations/200c3acd-0bce-5ffa-8836-1c226fb8faf1

I'd like to do the same with new items that have not yet been saved. so create a new item then click the modal to load it and set the new items input to be the id of the clicked/checked id listed, both visually on the page, and then of course when the submit button is clicked. 

I'm unsure how to populate the form with the ID data so that when the new record is submitted, it will have the associated IDs attached to it? 

Is there any documentation on someone that has done something similar? 

I'm trying to make this work like a visually selectable drop-down menu dynamically generated from existing data.

I couldn't figure out how to pull off creating a dynamically generated drop-down or how to make a drop-down selectable visually, so this is my next attempt. 

Any help guiding me on how I can try to pull this off would be much appreciated.   THANKS!

1 reply

Casey September 18, 2022

For anyone that encounters something like this.. 

Here is what I ended up doing as a work around. 

When someone goes to create a new item, instead of taking them to a blank form for them to fill out all of the information,  I actually create a new item with the only data being the name field "New Item" 

I have it redirect to the edit item page, so to the user it's pretty seamless. 

The only downside to this method is everytime they click new item, it will create an item which could clog up their database, so I'm just going to make sure the delete item functionality is very user friendly.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord