Forum Academy Marketplace Showcase Pricing Features

Save and update customer on single form?

Hi guys,

I have a form to Create Customer.

You can then view ‘My Customers’ in a RG and click ‘Edit’ if you want to update any.

When you click Edit, I want to send the User to the same ‘Create Customer’ form (to limit creating too many identical pages) and show the form fields already filled in so that it’s easy to Edit. But of course, the ‘Save’ button workflow created a new Thing, but I’ll need it to Make changes to a Thing if the User is editing.

Is there a way to enable both Create a new Thing AND Make changes to a Thingon the same form? Perhaps I can have two ‘Save’ buttons with different workflows and only show one if the ‘Name’ field is is the DB, but not sure how I add that a constraint to search for something in the DB?

Hi there, @darren.james7518… yes, you can do what you have described. One way to go about it is to put the fields on the form into a group, and set the type of content for the group to Customer. When a customer is being edited, send the Current cell's Customer from the repeating group to the group on the form. Then, use the Parent group's Customer to show existing content in the form’s fields and to know if you should create a new thing (which you will do when the Parent group's Customer is empty) or edit an existing thing (which you will do when it’s not empty, with the thing to edit being the Parent group's Customer, of course).

Hope this helps.

Best…
Mike

1 Like

That works a charm, thank you!

One final issue on this page:

The form fields correctly display the users details when editing, for example the name field’s ‘initial content’ is Current page customer's first name, but if I go to the ‘Add customer’ page fresh (not editing an existing customer) then I see Lorem Ipsum… in the form field. The placeholder is ‘First name’ but seems to get over ridden if I include the ‘initial content’ Current page customer's first name

How can I ensure that initial view of ‘Create Customer’ form shows the correct placeholder text (First name) AND, if editing then we should see the Current page customer's first name. Not sure how to do this?