CRM Development Tools Beta

MKukanjac
Member | Diamond Partner
Member | Diamond Partner

Section content refresh after serverless function hook

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!

4 Replies 4
SMohan33
Participant

Section content refresh after serverless function hook

@sejal_parikh Any update on this, resetting the form fields??

0 Upvotes
sejal_parikh
HubSpot Product Team
HubSpot Product Team

Section content refresh after serverless function hook

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. 

0 Upvotes
CMcKay
Contributor

Section content refresh after serverless function hook

@sejal_parikh any update on this? do you know of a timeline for the fix?

sejal_parikh
HubSpot Product Team
HubSpot Product Team

Section content refresh after serverless function hook

We are trying to get it out soon, tentatively next month.

0 Upvotes