• Resolved charliemcf

    (@charliemcf)


    Hi, I’ve set up a custom plugin (as per the PMPro documentation) to add additional fields via the Register Helper Add-On, works fine. Now I’d like to customise the default PMPro fields but can’t find a way to do this. I’d like to:
    Remove fields I don’t need
    Change the ‘required’ status of specific fields
    Change the default country
    I’m sure I could do much of this by editing the PMPro php files directly – eg I know I can edit countries.php to change the default country – but this is naughty, right? – breaks on updating, etc. All advice as to the best way to do this would be very welcome, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi there,

    Thank you for using Paid Memberships Pro.

    You are able to create a custom page template and edit the fields directly like this. This way you can keep Paid Memberships Pro up-to-date.

    Here is documentation to creating a custom page template – https://www.paidmembershipspro.com/documentation/templates/

    Thread Starter charliemcf

    (@charliemcf)

    Thanks Andrew, very helpful. I’ve created a custom template which works fine, but I’m unable to pass the ‘required’ attribute to fields in the same way that I can with Register Helper. So to try and make the First Name field required, for example

    <input id="bfirstname" name="bfirstname" type="text" class="input <?php echo pmpro_getClassForField("bfirstname");?>" size="30" required="true" value="<?php echo esc_attr($bfirstname); ?>" />

    doesn’t work, presumably because ‘required’ isn’t a recognised attribute? All advice very welcome.

    Thread Starter charliemcf

    (@charliemcf)

    OK, found the solution here in case it helps anyone else.

    Plugin Author Andrew Lima

    (@andrewza)

    Thank you for the feedback and sharing your solution.

    Have a great day further and please feel free to open a new support thread should you have any further questions.

    Alternatively, you may have a look here how HTML ‘required’ is handled – https://www.w3schools.com/tags/att_input_required.asp

    • This reply was modified 6 years, 12 months ago by Andrew Lima.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change Default Fields’ is closed to new replies.