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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Creating New Form in CiviCRM
Pages: [1]

Author Topic: Creating New Form in CiviCRM  (Read 962 times)

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Creating New Form in CiviCRM
September 27, 2010, 02:45:16 am
I have created a module that adds the ability to handle chapter memberships to CiviCRM. I have gotten to the point that a new member signing up can also join one or more chapters during the process and all of the pricing gets handled correctly and actual memberships are created.

I am stuck at the point of allowing existing members to join a chapter. I need a new form that isn't derived from any of the existing forms, so I don't think I can use the buildForm hook to create it. Is it possible to create a new form from scratch without hooking into any of the existing forms? Am I being myopic and missing a better way of handling this?

Thanks for your insight,
Quint
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Creating New Form in CiviCRM
September 27, 2010, 06:19:47 am

u'll need to do two things:

1. write a form class to implement the form

2. implement the xmlMenu hook to direct a url towards the above form

check:

http://svn.civicrm.org/sfschool/branches/v3.2/SFS/Form/
http://svn.civicrm.org/sfschool/branches/v3.2/SFS/xml/Menu/sfschool.xml

civicrm/sfschool/conference

is a good example :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

qjensen

  • I post frequently
  • ***
  • Posts: 141
  • Karma: 11
    • Scaled Solutions
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Creating New Form in CiviCRM
September 27, 2010, 09:39:47 am
Hey Lobo,

That is exactly what I needed to get going. Those examples are perfect!
Quint Jensen
Web Developer
Scaled Solutions
--" Remove the 'I want you to like me' notes from your forehead and place them where they truly will do the most good -- on your mirror!" Author Unknown

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Creating New Form in CiviCRM

This forum was archived on 2017-11-26.