Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
453 stars 598 forks source link

Embed Component returning null value when Request Parameter is not passed #3018

Open anand-morais opened 1 year ago

anand-morais commented 1 year ago

Required Information

Expected Behavior

When using embed component to load marketo forms if the request parameter or Javascript variable is not passed then empty value should be returned instead of null.

Actual Behavior

We are using embed component in our page to load the Marketo Forms. When we are trying to set Hidden value and set value in Marketo form . We have noticed that If request Parameter or Javascript Variable is not present , then it is returning null instead of empty . On form submission , this null value is getting submitted to the Marketo server.

Steps to Reproduce

  1. Create a Vanilla AEM 6.5 Instance
  2. Install SP 6.5.11
  3. Install ACS Commons version 5.1.0
  4. Goto Tools -> Cloud Services -> Marketo
  5. Add marketo instance configurations
  6. Create a new page under Sites
  7. Add the embed component to the page
  8. Edit the component
    1. Select a Marketo Form to load in the page
    2. Select values tab
    3. Select Set Value
      1. Select a field name from the dropdown
      2. Select Request Parameter as value source
      3. Input the desired value
  9. Save the component
  10. Try to load the form without sending the request parameter
davidjgonzalez commented 1 year ago

@anand-morais do you happen to have a PR that fixes this? im not too familiar w this component.