Add fields below Progressive Profile field set

Add fields below Progressive Profile field set

Want to be able to add a field below the progressive profile field set. At the moment the form prevents this.

Use case, Need to have a check box field for Explict opt-in/T&Cs and want this to be shown at the bottom of the form near the button and but not above the progressive profile field set. Fields to be selected as always shown, sit above the progressive profile field set and we cant mix and match. T&Cs need to be close to the submit button.
23 Comments
SanfordWhiteman
Level 10 - Community Moderator

From your DM it sounds like you solved this, but in case anyone is lurking

     data-wrapper-for="mktoCheckbox_19403_0 ourCheckboxFieldName"

     data-wrapper-for="mktoCheckbox_112345233_0 ourCheckboxFieldName"

     data-wrapper-for="mktoCheckbox_1912587235_0 ourCheckboxFieldName"

are all matched by the selector

     [data-wrapper-for~="ourCheckboxFieldName"]

You don't have to worry about the unpredictable part of the attribute as long as you use the tilde ~.

So you can reorder via:

     var checkboxRow = formEl.querySelector(".mktoFormRow[data-wrapper-for~='ourCheckboxFieldName']"),

         submitButtonRow = formEl.querySelector(".mktoButtonRow"),

         fieldOrder = [submitButtonRow, checkboxRow];

   

     FormsPlus.reorderFields(form, fieldOrder, true);

(I really, really hate that you can't use syntax highlighting here.)

Grégoire_Miche2
Level 10
kh-lschutte
Community Manager
Status changed to: Open Ideas