popup add_edit_item

Modal for adding or editing an item

This is the popup used for adding or modifying an Item on the platform. Exists in the menufocusgroup_review reusable and on the owner's portal.

Key Workflows

Button New Item is clicked

  • Creates a new Item (and sets its Review count to 0) if one does not exist already

  • Triggers the save_item workflow

Button Add Image is clicked

  • Creates an Image instance and adds it to the Images state of popup add_edit_item

  • If the Item does not have a primary image - which should only be the case when creating a new item or if you’ve deleted every existing image - then the newly created Image will be marked as the primary image

  • The new Image(s) are not saved to the Item until Button New Item is clicked

Group Make Primary Image is clicked

  • Sets the Image primary state to that cell’s Image

Group Remove Image is clicked

  • Deletes that cell’s Image

save_item [Custom workflow]

  • Updates the Item with the inputted values from the form

  • When saving the Image main and Images we refer to the Image primary and Image states on popup add_edit_item

  • Links the Item to the Images

Key Elements

RepeatingGroup Images

  • Contains the list of Images for the item

  • Populated from the Images state on popup add_edit_item

Last updated