CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • StateMachine - how to include a form based on user input?
Pages: [1]

Author Topic: StateMachine - how to include a form based on user input?  (Read 773 times)

bruntime

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.4.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
StateMachine - how to include a form based on user input?
November 04, 2011, 03:37:40 pm
Hi all - very new to CiviCRM.  I have a general question for a specific problem.  If someone could just point me in the right general direction of how to go about this, that would be great.

- In the Events checkout process, if the person checking out is an administrator, they are allowed to register someone who is not them for an Event.
- When they indicate this, I need the next form to be one that allows the administrator to create a Contact for this person if one does not already exist.  Once the contact is made, the checkout process resumes.
- If they don't indicate it, the normal checkout process continues without creating a contact.

I'm thinking I need to create a custom page to add a contact, then add that page to the StateMachine for CRM/Event/Cart/StateMachine/Checkout.php.  However, I don't know how to specify the condition under which this form should be skipped.  When I look at the code for addSequentialPages() it looks like there just isn't a way to implement this in StateMachine; is there something I need to do in the Controller CRM/Event/Cart/Controller/Checkout.php?

Thanks in advance!
« Last Edit: November 04, 2011, 03:49:48 pm by bruntime »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • StateMachine - how to include a form based on user input?

This forum was archived on 2017-11-26.