We're very happy that the sixth Shanghai Drupal user meetup managed to take place, just in time, at the end of August. A total of 15 people attended this meetup; although there weren't many people, the atmosphere was quite good.
Once most people had arrived at the sign-up point, we wasted no time getting this meetup started.
The first part of the meetup was a talk by Mike Yao, a development engineer at Raincity Studios, on the theme “AHAH, Drupal's dynamic forms”. As the meetup organizers, before each meetup we post in the SHDUG google group or in the Shanghai section of drupalchina to collect everyone's ideas and suggestions for the meetup topic, and then find a suitable Drupal development engineer to give a talk on the topic most people want to hear about. We hope that through talks like these, more people will get to know drupal and master more of its features; we also hope this helps more people solve the various problems they run into when using Drupal day to day. At present, since no one has yet volunteered to give a talk at the meetups, we have been asking the engineers at Raincity Studios to talk about the Drupal experience they have gathered in their everyday work. But we have always hoped for, and encouraged, friends from outside RCS to join the ranks of speakers and bring us a wider range of talk topics.
Below are Mike's slides from Saturday's meetup, for any interested friends:
1.What's AHAH?
Same Ajax, but simpler than Ajax2.What's the purpose of AHAH in Drupal?
Just one purpose for dynamic form3.AHAH basic requirement
main form
dynamic sub form
define a html element wrapperDrupal 6 AHAH forms: The easy way | Nick Lewis: The Blog'
AHAH form property
'#ahah' = array(
array(
'event' => click or change,
'wrapper' => html element id,
'path' => callback function,
),
),
AHAH process function4.example
$form['wrapper'] = array(
'#type' => 'item',
'#prefix' => '<div id="ahah-wrapper">',
'#suffix' => '</div>',
);
$form['new'] = array(
'#type' => 'submit',
'#value' => 'New',
'#ahah' => array(
'path' => 'ahah_test/execute',
'wrapper' => 'ahah-wrapper',
'method' => 'append',
'event' => 'click',
),
);
function ahah_test_execute() {
$form_state = array();
$form_build_id = $_POST['form_build_id'];
$form = form_get_cache($form_build_id, $form_state);
$num = $form['num']['#default_value'];
$num++;
$form['num']['#default_value'] = $num;
$form['ahah_sub_form'] = array(
'#tree' => TRUE,
);
$form['ahah_sub_form'] += ahah_sub_form($num);
form_set_cache($form_build_id, $form, $form_state);
$form = form_builder('ahah_main_form', $form, $form_state);
$output = drupal_render($form['ahah_sub_form']);
print drupal_to_js(array('status' => TRUE, 'data' => $output));
}5.AHAH properties list
'#ahah' = array(
'effect'
'event'
'method'
'path'
'process'
'wrapper'
)http://api.drupal.org/api/file/developer/topics/forms_api_reference.html/6#ahah
After Mike's talk of about 30 minutes, everyone discussed some of the questions raised by the topic, and then came time for open discussion. Quite a few friends took this opportunity to bring up problems they had run into while building their sites, hoping to get everyone's help, and of course everyone eagerly offered ideas and shared their own drupal experience. I trust these well-prepared friends did not go home empty-handed!
In fact, this is exactly one of the main purposes of organizing the meetups. Through a monthly meetup, we want to give Drupal users in Shanghai a platform for exchange, to share their gains and losses, experience and tricks from using it, just like “all for one, one for all” – I think this is exactly what open source is about. So we suggest that friends who come to future meetups gather the problems they usually run into beforehand and bring them up at the meetup; this kind of face-to-face, hands-on exchange is surely more effective than racking your brains on your own.
At this meetup we saw transdonkey, who hadn't shown up for a long time; before every event we saw him sign up very eagerly, but he never appeared, and this time we finally got to meet him. Li Yan, Zhao Liang and Han Tao, who have always supported our meetups and come often, were also there this time, and there were also some new friends attending one of our meetups for the first time. I don't know what everyone thought of this meetup, but we do hope you will keep supporting the Shanghai Drupal user meetups and come to our events often.
If you'd like to give a talk at a meetup, you can contact me directly: peggy@raincitystudios.com, or any staff member you know at the Raincity Studios Shanghai office; you can also simply reply in the comments under the posts we publish.