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) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Understanding code - follow-up for parents registering their children
Pages: 1 [2] 3

Author Topic: Understanding code - follow-up for parents registering their children  (Read 18364 times)

chiebert

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Understanding code - follow-up for parents registering their children
March 16, 2012, 08:56:20 am
@Coleman: Wonderful - works just as advertised (well, it wasn't really advertised, but you know what I mean). I don't know where you live or if you're going to be at CiviCON, but I'll buy you a beer!

@Eileen: I owe you a beer, too, but it wasn't the API v3 docs I was referring to in my comment. I already knew about those resources thanks to you, from your tip on IRC the other day. Love those. Hear and behold, all ye who come after: Your CIVI_CODE_ROOT/api/v3/examples folder has a ton of great API v3 examples.

Actually, in my comment I was referring to the current hook specification: http://wiki.civicrm.org/confluence/display/CRMDOC41/CiviCRM+hook+specification. There are lots of examples there, but (a) not all of them use the API to get their job done (though some certainly do that), and (b - and important for my situation) since there's no real forms API (like Drupal's own powerful FAPI) one has to rely on knowing the right methods on the $form object. The only $form methods used in the examples are:

  • $form->getVar()
  • $form->setVar()
  • $form->setRule()
  • $form->getAction()

And now:

  • $form->assign()

Questions I'm sure other new developers would find relevant:

  • Is there a (relatively) easy way to find/make a more comprehensive list of available methods for various objects, and their parameters, along with what they make possible?
  • When would one use setVar versus assign methods?
  • As I now know, $form->assign() helps me set the value of $form->_values['intro_text']. By analogy, can I use the assign method to set the other values in that array? I just tried with 'footer_text' (success!) and 'title' (fail!)

Anyhow, I'm sure answers to these could help in extending the documentation wiki, which I'm happy to contribute (along with the other docs additions I'm preparing, once my current frenetic work reaches a plateau).

I love CiviCRM (and Drupal), and have found this developer community extremely helpful and generous, so when I can't find something in the docs that - once I figure it out with help from the gang here on the forums or IRC - turns out to be so much easier than I'd feared, I hope to be able to carve some time to make the way easier for those who follow.</end-testimonial>

Oh, and @Donald: it goes without saying that you get a beer, too.

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: Understanding code - follow-up for parents registering their children
March 16, 2012, 09:10:07 am

hey chiebert:

Not sure where you are based, but looking forward to meeting you (and collecting my beer) at CiviCon!

If you can make it, would be great to have you at either the

pre-CiviCon sprint: http://civicrm.org/civicrm/event/info?reset=1&id=183
post-CiviCon sprint: http://civicrm.org/civicrm/event/info?reset=1&id=184

We have quite a few folks attending and would be great to have more!

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

chiebert

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Understanding code - follow-up for parents registering their children
March 16, 2012, 10:55:59 am
Hey, Lobo: I'm in Victoria, BC (Canada), and alas! I'm only in SF for CiviCon + NTC and must fly back the night NTC ends. Next time, though - especially interested in the Online Documentation Group. - Craig

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Understanding code - follow-up for parents registering their children
March 16, 2012, 12:29:36 pm
Oh yeah - the form stuff is hard - if the pre & post hooks can't do what I want then I go back to the customer & try & talk them out of the customisation & only deal with the form hooks as a last resort :-)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Understanding code - follow-up for parents registering their children
March 16, 2012, 01:41:20 pm
Glad to be of help, and glad to join you for a beer :)
Try asking your question on the new CiviCRM help site.

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Understanding code - follow-up for parents registering their children
March 17, 2012, 11:08:42 am
Quote from: colemanw on March 15, 2012, 04:47:56 pm
You are welcome to look at the code

I'd enjoy seeing your code!
Lead Developer, C3 Design.
Twitter: @FatherShawn

magnolia61

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34 / Joomla 3.3.6
  • MySQL version: MySQL 5.5.40
  • PHP version: PHP 5.5.19
Re: Understanding code - follow-up for parents registering their children
August 21, 2012, 11:44:19 am
It has been a while since the last update in this topic, so please correct me if there is a newer specifically on this subject.
I am working with a foundation that organizes youthcamps and therefor am very interested in having parents signing up theis kids through civicrm.
Is the code Coleman was working on available or has anyone else further achieved tangible results in this?
What we are looking for is:
1) parent registers an account
2) parent registeres one or more children for one or more events.
3) relationship is automatically set and next year parent only selects the children from the DB and check the info still to be current.
Does anyone have an usefull update on this?

With kind regards,
Richard van Oosterhout, the Netherlands

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Understanding code - follow-up for parents registering their children
August 21, 2012, 02:43:06 pm
You can do all of that right now using webform_civicrm 3.
Except for paying for events. The schema still does not support paying for events that are not your own. So...
1. You could use your own system (i.e. quickbooks) for invoicing and payments
2. You could pay a developer to implement a custom solution (or try to adapt my code for your use)
3. You could offer your camp for free ;)
Try asking your question on the new CiviCRM help site.

magnolia61

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34 / Joomla 3.3.6
  • MySQL version: MySQL 5.5.40
  • PHP version: PHP 5.5.19
Re: Understanding code - follow-up for parents registering their children
September 17, 2012, 11:59:23 am
@Coleman: the webform solution discussed here is a drupal only solution, is that right? (from what I learned by searching around) I am using Joomla. Any chance this solution will be built into something platform independantly?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Understanding code - follow-up for parents registering their children
September 17, 2012, 02:06:33 pm
There is little chance that will happen this year, but it is certainly on the table to have more robust form-building from within civicrm. I'm optimistic that we'll be able to do this by version 5, but there are a lot of "ifs" so I wouldn't hold your breath.
Try asking your question on the new CiviCRM help site.

baergaj

  • I’m new here
  • *
  • Posts: 8
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.16
  • MySQL version: 5.5.27
  • PHP version: 5.3.17
Re: Understanding code - follow-up for parents registering their children
March 29, 2013, 09:51:08 pm
Quote from: Coleman Watts on March 15, 2012, 04:47:56 pm

You are welcome to look at the code, but much of it will not be applicable to your situation. However I think the general approach works quite well. I recommend it :)


I am implementing online registration for a summer kids camp, and it looks like this is my best option.

Maybe I am just missing it, but where can I find your code?

Thanks!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Understanding code - follow-up for parents registering their children
March 29, 2013, 10:41:06 pm
github.com/woolman
Try asking your question on the new CiviCRM help site.

dreadedhamish

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CMS version: Drupal 7, Wordpress
Re: Understanding code - follow-up for parents registering their children
June 18, 2013, 08:37:03 pm
Is there any news on the schema supporting payments for third parties?

Has anyone paid a developer for a custom solution that they would be willing to share?
Is there a better way to sponsor this to get it included in core, rather than a custom solution?

I'm new here!  I'm helping with a church group and thought I could handle it until I came across the registering kids problem.

Hamish

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Understanding code - follow-up for parents registering their children
June 19, 2013, 09:43:33 pm
I am working on the final bug fixes for an extension that handles a parent registering their children for an event.   I will be publishing it in the civicrm.org/extensions area shortly.   Its a native CiviCRM extension so it will work with any CMS. There is no dependency on any Drupal modules or anything else.

« Last Edit: June 19, 2013, 09:45:21 pm by epg »
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

magnolia61

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34 / Joomla 3.3.6
  • MySQL version: MySQL 5.5.40
  • PHP version: PHP 5.5.19
Re: Understanding code - follow-up for parents registering their children
June 20, 2013, 03:12:29 am
Supernice! I think this will be an extension lots of summercamp organisations like ours will be very happy with. I'm looking forward to learn more on the functionality and to see it in action!

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Understanding code - follow-up for parents registering their children

This forum was archived on 2017-11-26.