|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Need some Drupal FAPI/AJAX adviceI'm trying to figure out how best to make the following
happen, any pointers/documentation/example modules would be awesome: 1) Click a button on the webpage 2) Jquery fires off a request for a unique form that is not
a node or menu or anything else 3) Somehow drupal understands the url that I use and fires
the appropriate function 4) mymodule_send_form() will invoke drupal_get_form()
(maybe?) 5) Jquery recieves the rendered form, adds stuff to it via
hidden inputs like x & y, $_Get['q'], $user->id, etc. 6) user can fill it out 7) Jquery sends data back to be saved/verified 8) Jquery recieves a final themed output of content 9) Repeat as many times as user wants on the same page by
clicking the button mentioned in #1 What has me very confused is that I need to send and receive
themed output, but without the entire site. Simply need chunks of final output
to be sent back and forth. After a discussion on #drupal the other night I
determined that AHAH is not exactly designed to do entire forms. I think I know more about Drupal 7 (having spent the most
time in D7 issue que), but I'd like a working version in Drupal 6 first.
_____________________________________ Josh Miller Web / Technology Director Haan Marketing +
Communications 123 N. 8th Street, Lafayette,
IN 47902-0350 T. 765.423.5470 F. 765-742-2881 |
|
|
Re: Need some Drupal FAPI/AJAX adviceThe problem is not that no one has answered this need, but that
practically everyone has--each in a different way. The Popups module http://drupal.org/project/popups and Lightbox2 http://drupal.org/project/lightbox2 each provide some version, http://drupal.org/project/ajax provides server-side handling of ajax form submission, to mention just a few. My advice though would be to start with Chaos tools, http://drupal.org/project/ctools. It's the best abstracted approach--and its approach to AJAX forms the basis of AJAX in D7. Josh Miller wrote: > > I'm trying to figure out how best to make the following happen, any > pointers/documentation/example modules would be awesome: > > > |
|
|
Re: Need some Drupal FAPI/AJAX adviceJosh Miller wrote:
> I'm trying to figure out how best to make the following happen, any > pointers/documentation/example modules would be awesome: > The CTools module contains an AJAX framework which is the foundation for the AJAX framework in Drupal 7 that is designed to accomplish tasks exactly like this. It also includes multi-step wizard tools for forms. |
|
|
Re: Need some Drupal FAPI/AJAX advicehttp://drupal.org/project/feedback
________________________________ From: development-bounces@... [mailto:development-bounces@...] On Behalf Of Josh Miller Sent: Friday, October 30, 2009 3:39 PM To: development@... Subject: [development] Need some Drupal FAPI/AJAX advice I'm trying to figure out how best to make the following happen, any pointers/documentation/example modules would be awesome: 1) Click a button on the webpage 2) Jquery fires off a request for a unique form that is not a node or menu or anything else 3) Somehow drupal understands the url that I use and fires the appropriate function 4) mymodule_send_form() will invoke drupal_get_form() (maybe?) 5) Jquery recieves the rendered form, adds stuff to it via hidden inputs like x & y, $_Get['q'], $user->id, etc. 6) user can fill it out 7) Jquery sends data back to be saved/verified 8) Jquery recieves a final themed output of content 9) Repeat as many times as user wants on the same page by clicking the button mentioned in #1 What has me very confused is that I need to send and receive themed output, but without the entire site. Simply need chunks of final output to be sent back and forth. After a discussion on #drupal the other night I determined that AHAH is not exactly designed to do entire forms. If anyone is interested (I know from a tweet discussion that bangpound is) I've got a working javascript framework for adding comments to entire pages. I'm going to call this module "critique" and it's main use will be turning it on and having clients add comments to pages (like you would for PDFs or Word Documents). The problem is I can't decide how to architect the backend as it will have to be very AJAX-y. I think I know more about Drupal 7 (having spent the most time in D7 issue que), but I'd like a working version in Drupal 6 first. Josh _____________________________________ Josh Miller Web / Technology Director Haan Marketing + Communications http://www.haanmc.com/ 123 N. 8th Street, Lafayette, IN 47902-0350 T. 765.423.5470 F. 765-742-2881 |
|
|
Re: Need some Drupal FAPI/AJAX adviceAHAH/AJAX does do fine with a complete form. You can process a part of a form, the whole form, or even do HTML replacement on something outside the form. I'm still not sure it's what you want, of course.
The Examples module (http://drupal.org/project/examples) now has both D6 and D7 versions of the AHAH example. There is a D6 AHAH tutorial at http://randyfay.com/ahah. -Randy On Fri, Oct 30, 2009 at 8:39 AM, Josh Miller <JoshM@...> wrote:
-- Randy Fay Drupal Development, troubleshooting, and debugging randy@... +1 970.462.7450 |
| Free embeddable forum powered by Nabble | Forum Help |