We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Nov 8, 2022 4:18 AM - edited Nov 8, 2022 4:20 AM
Hello, I've been working with the Custom CRM Cards in the middle pane and I've stumbled upon a "problem". Or, probably I am doing something wrong 🙂
In the button component example that we have in the documentation, when you click the button it triggers a serverless function hook, fetches the quote from an external API, and the data received is loaded into the section without page reload.
I am trying to do the same with a form submission, but my sections don't refresh/reload with the new data that I provide. Is there a way to trigger the sections to refresh/reload after the form submission event?
The form example that we have is only displaying a message banner when the form is submitted and I've tried including the sections with new data in the submission event context, but I only can trigger a message banner. Sections remain the same:
if (event && event.type === 'SUBMIT') {
const { example_input } = event.payload.formState;
sendResponse({
sections: [introMessage, ...companyInfo, ...deals],
message: {
type: 'SUCCESS',
body: `Form submit was successful. Input's value: ${example_input}`,
},
});
}
How come the sections refresh works by invoking a serverless function with a button and not with a form submission?
Thanks!
3 weeks ago
@sejal_parikh Any update on this, resetting the form fields??
Nov 8, 2022 2:15 PM
Hi, thanks for bringing this to our notice. Forms actions are not yet supported with different types of reactions such as card refresh or reset. It is a known issue and we are working on this.
Nov 16, 2022 9:53 AM
@sejal_parikh any update on this? do you know of a timeline for the fix?
Nov 16, 2022 5:02 PM
We are trying to get it out soon, tentatively next month.