CTA Buttons Move when Description is Missing

Hi Team,

I have a client for which CTA buttons do not display in their usual location given a product card does not have a description provided. Please refer to the screenshot below.

Is there a way to enforce CTAs staying in one part of the card regardless of whether or not field values are provided?

I’m also including a screenshot of any custom CTA styling that exists within the account - I don’t think any of it would affect this behavior, however. Has anyone seen this before?

image

Hey Luc -

You can use formatters to get the CTAs to stay to the right like the results with descriptions by doing something like this:

  1. Go to Jambo Commands > Override Theme then select formatters.js

  2. In the formatters.js file input:

    static description(profile) {
        if (profile.description) {
            return profile.description;
        }
        return ' ';
    }
  1. In your cards component file for details replace profile.description with Formatter.description(profile)

This makes it so if you don’t have a description in KG, it will return a space or " " for the description. This will force the CTAs to wrap to the right like the other CTAs.

Not sure if you can do this with CSS or by editing the card template but this can be used as a work around for your issue.

1 Like