When a dynamic field is updated, trigger Action on another form

By: Jim Bynum | Asked: 04/11/2022
ForumsCategory: How-toWhen a dynamic field is updated, trigger Action on another form
Jim BynumJim Bynum asked 2 years ago

I have a categories type form where users can add and edit categories that they can then select when filling out another form.

When using Dynamic lookup when a user changes the name of one of the categories, the name does change on the second form, but this does not trigger an Update in the actions tab. I need it to trigger an update because I use a webhook to update an offsite database that needs to have the same info as the dynamic field.

Is there a way to force this trigger somehow? I've looked everywhere and can't seem to find it.


ALSO, along these lines. Is there a way a user can select one of their dynamic categories and have the option of creating a new category without having to go to that specific form to do it?

Thanks again!

1 Answers
Victor Font answered 2 years ago

To answer your question, it's important to understand how dynamic fields work. When you have a dynamic field on a form, the value that is stored in the entry is the record id of the dynamic selection. You saw the name change because of the record id link that exists between your primary form and the dynamic lookup form. The name did not change in your primary form where you use th dynamic field because the name is stored with that form. Dynamic values, such as name, are displayed in realtime from the lookup entry, not your form. The record id value in your form never changes no matter what changes you make in the dynamic form.

What this means is that you did not update any values in the form that uses the dynamic field. The record number stored with the form never changes.

If you want to update a field in a remote form, you need to trigger an API update when you change the name in the lookup table, not from your primary form. For this, I would use the API add-on. You don't need a separate trigger.

As for your second question, you can have an add new value link and update the dynamic value in realtime using Ajax.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community