I am currently working on a form that includes custom fields such as property name, address, along with standard fields like email and name. Upon form submission, I aim to use custom code to achieve the following:
Read the form submission data.
Use the custom properties to create a custom object in HubSpot.
Associate this custom object with the contact, using a specific label.
However, after reviewing the available options, it appears that there is no straightforward way to add a custom code action for form submissions.
Could anyone guide me on how to implement this functionality? Your assistance would be greatly appreciated.
One last try on this - again I feel there are some drossed wires.
When the form you have constructed is submitted, the data collected by the form fields are already in the record created by the form submission. This is true for contact objects or custom objects.
So if you have defined custom contact properties as described in your original question - such as 'property name' - and included them as fields on the form being filled then those propoerty values are directly accessible in the contact workflow triggered by the submit action. You can pass them as input parameters to your custom code workflow step.
There is no need to reference any action properties - that seems like a red herring to be honest.
Additionally, if you have defined a custom object - example MyObject with properties CustomA, CustomB, CustomC - then you can include those properties, if required, on the same form. This would additionally enable you to construct a MyObject type workflow with a trigger such as CustomA is known. When that type of workflow executes, the property values from the form fill are directly accessible - again you can pass them as input parameters to your custom code workflow step.
I agree with the poster. I am having the same issue. I am trying to use custom code to register attendees to a marketing avent that have already had a form submission go through as we didn't have the workflow created prior to this form going live so I am trying to get the form submission date to be the same as the registration date but I cannot seem to find a way to pull the form submission date?
@AliFawadHassan - I'm sure there must be something missing in the problem description here. The mechanisms I use regularly in (apparently) the same situation is to define the form around the custom object properties, trigger a workflow on submission (or value 'known') and then use custom code workflow steps to manioulate the properties and associate records together. This all works very effectively.
Jun 19, 202411:57 AM - edited Jun 19, 202411:57 AM
Key Advisor
Custom Code Action for Form Submission
SOLVE
This is where I think there must be a miscommunication - if some of the properties of the custom object are set using form fields, then after form submission you should be able to refrence those directly. For example you could use them as input variables for the custom code.
@SteveHTM There is no unique field that I can refer to in the custom object, and as you can see, I'm unable to get any form data. If I get the submission ID, I will easily get the data through the API, but I'm unable to get any data from the form submission trigger.
We can trigger a workflow; that's possible. However, the issue I'm facing is that I want to read the form submission data and use custom code to perform manual tasks, such as associations.
One last try on this - again I feel there are some drossed wires.
When the form you have constructed is submitted, the data collected by the form fields are already in the record created by the form submission. This is true for contact objects or custom objects.
So if you have defined custom contact properties as described in your original question - such as 'property name' - and included them as fields on the form being filled then those propoerty values are directly accessible in the contact workflow triggered by the submit action. You can pass them as input parameters to your custom code workflow step.
There is no need to reference any action properties - that seems like a red herring to be honest.
Additionally, if you have defined a custom object - example MyObject with properties CustomA, CustomB, CustomC - then you can include those properties, if required, on the same form. This would additionally enable you to construct a MyObject type workflow with a trigger such as CustomA is known. When that type of workflow executes, the property values from the form fill are directly accessible - again you can pass them as input parameters to your custom code workflow step.