[support] FAPI: Elements

Peter Childs pchilds at bcs.org
Sat Sep 19 15:59:02 UTC 2009


2009/9/18 Metzler, David <metzlerd at evergreen.edu>:
> I'm not sure this needs ahah, but rather a form_alter hook to add the
> form item and submit handler.  What is ahah's role here?
>
> Dave

I want to take what they enter check it with the database, then let
the user say, yes thats what I meant, or no, its actually this.....
(In this case its taking an address and ensure its understood before
submit)

Peter.

>
> -----Original Message-----
> From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
> Behalf Of Peter Childs
> Sent: Friday, September 18, 2009 2:37 AM
> To: support at drupal.org
> Subject: [support] FAPI: Elements
>
> I'm need a Form Element that I can slot into several forms in this case
> for selecting location details but the theory runs for anything.
>
> Ideally I want to AHAH enable it so that I can check and update it as
> they fill the form in pro to submission.
>
> So Far I've worked out.
>
> Build the element in a #process callback (where previous values are in
> #default_value)
>
> Check it in a #element_validate callback (where previous values are in
> $element (the first parameter) but if you need to update or add anything
> change the second parameter that is passed by ref.
>
> The only thing I've really got on using AHAH is to get the whole form to
> build and work correctly without it then add it afterwards.
>
> But I can see how I get just the element to use AHAH and then be able to
> just drop it into any form later.
>
> I've looked at most of the documentation and it seams a bit complex.
>
> I'm using Drupal 6
>
> Any help or guidance would be much appreciated.
>
> Peter
> --
> [ Drupal support list | http://lists.drupal.org/ ]
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list