Petition page variables
| Variable | Description |
|---|---|
| content | The petition text itself, in HTML e.g. {{ page.petition.content }} |
| content_text | The petition text itself, in Text e.g. {{ page.petition.content_text }} |
| intro | Intro to petition e.g. {{ page.petition.intro }} |
| signature_name | What to call the signature (ie "signature" or "endorsement") e.g. {{ page.petition.signature_name }} |
| goal | Displays goal for petition if one is set e.g. {{ page.petition.goal }} |
| signatures_count | Total number of signatures for petition e.g. {{ page.petition.signatures_count | number_with_commas }} |
| has_goal? | Checks if the petition has a goal set e.g. |
| has_met_goal? | Checks if the petition goal has been met e.g. {% if page.petition.has_met_goal? %} |
| percent_of_goal | Percent of goal met e.g. {{ page.petition.percent_of_goal }} |
| is_volunteer? | Checks if petition is configured to ask for volunteers e.g. |
| is_image? | Ask for an image to upload? e.g. {% if page.petition.is_image? %}{% endif %} |
| require_image? | Is an image required? Like for an image only petition e.g. {% if page.petition.require_image? %}{% endif %} |
| is_address? | Checks if petition is configured to ask for an address e.g. |
| require_address? | Checks if an address is required to sign petition e.g. See page.petition.require_address? variable in is_address? example above |
| home_address | Allows input to discrete home address fields (address1, address2, address3, city, state, zip, county, country_code) instead of submitted_address e.g. |
| billing_address | Allows input to discrete billing address fields (address1, address2, address3, city, state, zip, county, country_code) instead of submitted_address |
| work_address | Allows input to discrete work address fields (address1, address2, address3, city, state, zip, county, country_code) instead of submitted_address |
| mailing_address | Allows input to discrete mailing address fields (address1, address2, address3, city, state, zip, county, country_code) instead of submitted_address |
| is_signed? | Checks if the user has already signed the petition e.g. {% if page.petition.is_signed? %} |
| current_signature | If the current user has signed the petition, useful for deleting it e.g. {{ page.petition.current_signature | delete_link message: "Remove signature" }} |
| signatures_with_images | array of petition_signature objects |
| recent_signers | array of signup objects |
| recent_signers_with_pictures | array of signup objects |
| random_signers | array of signup objects |
| random_signers_with_pictures | array of signup objects |