Book Image

CiviCRM Cookbook

Book Image

CiviCRM Cookbook

Overview of this book

CiviCRM is a web-based, open source, Constituent Relationship Management (CRM) software geared toward meeting the needs of non-profit and other civic-sector organizations.Organizations realize their mission via CiviCRM through contact management, fundraising, event management, member management, mass e-mail marketing, peer-to-peer campaigns, case management, and much more.CiviCRM is localized in over 20 languages including: Chinese (Taiwan, China), Dutch, English (Australia, Canada, U.S., UK), French (France, Canada), German, Italian, Japanese, Russian, and Swedish.CiviCRM Cookbook will enhance your CiviCRM skills. It has recipes to help you use CiviCRM more efficiently, integrate it with CMSs, and also develop CiviCRM.This book begins with recipes that help save time and effort with CiviCRM. This is followed by recipes for organizing data more efficiently and managing profiles.Then you will learn authentication and authorization and managing communication with contacts.Then you will be guided on using the searching feature and preparing reports. We will then talk about integrating Drupal and CiviCRM. You will also be taught to manage events effectively. Finally, learn about CiviCampaign, Civimember, and developing CiviCRM.
Table of Contents (19 chapters)
CiviCRM Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using jQuery to show and hide form elements by user choices


Sometimes, you may want to expose form elements depending on what previous choices a user has made. For example, you might run a conference over two days. If people only want to attend one day, you will only want to show them further options for that day.

How to do it…

This recipe shows you how to gain control of your event registration forms using jQuery.

  1. Set up a pricelist for your event. Navigate to Administer | CiviContribute | New Price sets and create a new set.

  2. In the new set, create a checkbox field so users can choose what days they want to attend:

  3. Provide two choices: Monday and Tuesday.

  4. Make the Amount column for each choice to be free.

  5. Uncheck Display Amount. This presents the user with two checkboxes with no price display.

  6. Add another checkbox field for further choices for Monday, to be used if the user selects Monday in the first field.

  7. Provide the Lunch and Dinner options for Monday.

  8. Repeat this for Tuesday.

  9. Create an event...