Logic update item

I’m using Logic for the very first time and trying to update a cms item on form submit.
One problem, update item need the cms item id but I haven’t any way to get that into my form.
What’s the trick?

1 Like

I haven’t played with logic for awhile but as I recall, the approach is;

  • Pass your item slug into a form field that is not visible ( display: none; ), which is different from a hidden input, or one marked visibility: hidden;
  • In the logic flow you then receive the slug and can do a lookup to get the item id.

UPDATE - I’ve just tested this and it works great, with two caveats-

  1. There seems to be an issue with the update process in which the change is marked as a Staged change, rather than pushing to the Live item. I’ve seen this problem in the circle-so forums, didn’t realize it was still a thing- but it may be because this test project is not yet on a hosting plan. Let me know what you find.
  2. If you’re actually wanting to display the previous item for update, you’ll need to do some JS to populate the form fields from the CMS.
1 Like