Overriding default form fields in a landing page

Your software
My Mautic version is: 7.1.2
My PHP version is: 8.3
My Database type and version is: Mariadb

Your problem

Hi, not sure if this is a feature request or a support questions, as I’m still a noob with Mautic and might be doing this all wrong. I was wondering if it was possible to override a hidden field in an embedded form on a landing page?

This is for lead generation. The idea is to give affiliates a private form they can fill out multiple times with the details of potential leads for me to follow up on later (and have them show up as contacts in Mautic, or at least visible in the form results). The hidden field would be used to attribute the lead to them for commission purposes.

My current ideas for implementing this:

  1. Create a unique landing page and form per affiliate, which is tedious and a lot of work
  2. Embed a javascript snippet in the landing page that updates the hidden field with a URL parameter, which is probably fine
  3. Have some way to override it within GrapeJS, like `{form=ID, affiliate_value=123}`

Option 2 would probably be the easiest, but was curious if there are better options?

Update: I tried the javascript thing, but it seems like something is stripping out all javascript tags I try to add to a landing page. I even tried adding it to a custom theme, but it doesn’t work :frowning: