0

Not sure if I'm asking this right...

I need to pass a few lead IDs at the form submission event but am unable to add hidden fields to the form. Is it possible to update the lead entity in CRM (ZOHO) right after form submission, via the POST method, using only JavaScript? (I have access to google tag manager and nothing else)

This is the scenario: lead is submitted via a web form which triggers custom JS Google tag manager tag use some kind of webhook to update newly created lead in CRM.

Is this possible or do I need to provide better info?

Thank you very much

user3191724
  • 139
  • 10

1 Answers1

1

It is difficult to achieve without having more details on the structure of the payload, the destination, the way the form is implemented, etc.

You still can add hidden fields to the form with GTM although that wouldn't be considered the best usage for it.

What you've described is doable, but it's unlikely that the form submit trigger will be of any help since modern forms are not using the native html submit functionality due to it being obsolete. Same goes for the form fields. Adding a hidden field is unlikely to influence the payload.

On the other hand, ZOHO may allow for arbitrary correctional hits to be sent to its endpoints to enrich already collected data, which I doubt would be very smooth.

in short, GTM is not the right tool to do it. It may be possible, but even if it is, it's not the proper way and is likely to cause problems in future. Consider involving your front-end or CRM devs.

BNazaruk
  • 6,300
  • 3
  • 19
  • 33
  • Thank you BNazaruk. Is it possible to add hidden fields to the form using GTM (I am not referring to the value insert into existing form fields)? If yes any link would be greatly appreciated :) – user3191724 Oct 04 '21 at 14:59
  • 1
    you can do both: add values to existing fields and add hidden fields. Again, I doubt it will be useful in your case, but you just use a custom HTML tag triggered on page load/dom ready and in that custom HTML, you have the freedom to use a – BNazaruk Oct 04 '21 at 20:50
  • It worked (I am firing tag on 1st form click)! Thank you. Now I have another question but it will be a new post /situation. – user3191724 Oct 07 '21 at 20:59