0

I need to edit the HTML for the submit buttons when using Freeform Next so I can add a next/prev arrow. I've added my custom formatting template, but when I try changing the submit code only, it shows only one button even when there is a previous button.

I've tried the following, but not sure how to get the previous button to show as well, when I display the field types in the loop, it shows only one submit type when both the next/prev are there. Does anybody have anymore info about how the submit field is rendered or how I can edit both buttons?

{if field:type == 'submit'}
    <button type="submit" class="btn">{field:label} <svg width="16" height="16"><use xlink:href="#sprite-rightArrow"></use></svg></button>
{if:else}
    {field:render
        class="freeform-input"
        label_class="freeform-label{if field:required} freeform-required{/if}{if field:input_only} freeform-input-only-label{/if}"
        error_class="freeform-errors"
        instructions_class="freeform-instructions"
    }
{/if}

1 Answer 1

0

Since you're using with a multi-page form and the Submit button handling is a bit complex when displaying both buttons together, there may not exactly be a way to handle this within the template.

However, it'll look a little ugly, but you can probably place that SVG code directly into Composer for the labels of the buttons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.