Customizing the petition form is easy if you have a basic understanding of PHP coding. However, contact me via the support page if you face any issues. I’ll be happy to assist you.

Appeal WordPress Theme Petition Form Field Customization.

 

Step 1- Open Petition Templates Folder

Using FTP or server file manager, go to the wp-content/plugins/petitions-manager/petition_templates folder.

Step 2 – Copy The Template Files

Copy the petition_templates folder and paste it to the currently activated theme folder.

Step 3 – Paste Files To The Active Theme Folder

We assume “appeal” is our currently activated theme. Next, go to the wp-content/themes/appeal/petition_templates folder and open the sign_form.php file. Go to line 114, and you will get the code like the screenshot.

Example Shortcode:

$shorcode_string = '[bpsff cc="2" ft="input" fn="bpt_user_name" fp="' . __('Your Name', 'bwl_ptmn') . '" fr=1 fer="' . __('Name Required', 'bwl_ptmn') . '" /]';
$shorcode_string .= '[bpsff cc="2" ft="input" fn="bpt_user_email" fp="' . __('Your Email', 'bwl_ptmn') . '" fr=1 fer="' . __('Invalid Email.', 'bwl_ptmn') . '" /]';
$shorcode_string .= '[bpsff cc="2" ft="input" fn="zipcode" fc="bpcf zipcode" fp="' . __('Zipcode', 'bwl_ptmn') . '" fr=1 /]';
$shorcode_string .= '[bpsff rs=0 cc="1" ft="input" fn="bpt_user_address" fp="' . __('ADDRESS', 'bwl_ptmn') . '" fr=1 fer="' . __('Address Required', 'bwl_ptmn') . '" sts="' . $opt_address_status . '"/]';
$shorcode_string .= '[bpsff cc="2" ft="input" fn="city" fc="bpcf" fp="' . __('CITY', 'bwl_ptmn') . '" fr=1 /]';
$shorcode_string .= '[bpsff cc="2" ft="input" fn="state" fc="bpcf" fp="' . __('STATE', 'bwl_ptmn') . '" fr=1 /]';
$shorcode_string .= '[bpsff cc="2" ft="country" sts="' . $opt_country_status . '"/]';
$shorcode_string .= '[bpsff cc="2" ft="captcha" fn="captcha" fr=1 fer="' . __('Invalid Captcha.', 'bwl_ptmn') . '" sts="' . $captcha_status . '" /]';
$shorcode_string .= '[bpsff rs=0 cc="1" ft="textarea" fn="bpt_user_msg" fp="' . __('Optional Message', 'bwl_ptmn') . '" sts="' . $opt_msg_status . '"/]';

Legends:

  • cc: column class (Example Value: 1,2,3,4,
  • ft: field type (Example: input, textarea, submit )
  • fn: field name (Example: bpt_user_name)
  • fp: field placeholder text (Example: Your Name)
  • fr: field required (Set the value as 0 if you want to mark the field as optional)
  • fer: field error message (Add an error message of a particular field)

Important Note:

  • If you want add custom fields, you must add the fc=”bpcf” value into the shortcode. Please check the CITY field in the example code.
  • For the Zip Code field, you must add the fc=”bpcf zipcode” value into the shortcode. Please check the ZipCode field in the example code.

 

Last Update: November 2, 2023
March 14, 2023 423 Mahbub Alam KhanAppeal WP
Total 0 Votes
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Back To Top