Archived topic
Convert button span to
5 replies · Started by Rekindle on July 1, 2021
Hi,
On all our Gravity Form submit buttons, we have progress loaders (those little circles that spin when the button is clicked). That CSS doesn't work on the buttons we created using GenerateBlocks, because the buttons created by GenerateBlocks are <span>. I'm trying to avoid using extra JS.
Is there an option to convert the spans to <button>? Or another way to solve this?
The page link is below. I've added the CSS using Simple CSS on that page.
Thanks!
Hi there,
no - GenerateBlocks only outputs <a> element or <span> if there is no URL attached.
If you require a <button> element then you will need to add that using HTML.
Hi David,
Should I use the "Edit as HTML" option and change the span to a button, or is there another way to do this? If I use that option, I get the "Attempt Block Recovery" message. Or should I just add a custom HTML block?
Thanks.
Should I use the “Edit as HTML” option and change the span to a button, or is there another way to do this? If I use that option, I get the “Attempt Block Recovery” message. Or should I just add a custom HTML block?
It's better to just create a custom HTML if it's a simple button because modifying the HTML of a GB block breaks it anyway and turns it into custom HTML. Might as well make the button directly. :)
Got it. Thanks Elvin.
No problem. :)