Hello all,
This may be a really easy question but I can't seem to find an answer to it. If I want to have a custom form in my site, I know I will have to use the Forms API, but how do I get the form to display?

Will I need to create a custom module?

Is there a tutorial anywhere that kind of walks you through creating a new site, then customizing it?

Thanks.

Chris

Comments

dman’s picture

First -
The forms API is an available tool library, but you are not forced to use it unless you are interacting with other bits that do.
If you want do build your own custom form, go ahead and do it in HTML.
Go ahead and read the data in from $_GET or $_POST

It'll work, and is probably the best way to start getting SOMETHING working.

  • You can do this in a single php-content page, but it's a hell to edit and test.
  • You can do this with a php-content page that just includes a library where you put the actual code (good for first steps in developing)
  • You can start building your own module (you are still welcome to just do the forms by hand yourself) but it requires a little learning curve to get up to speed. See the drupaldocs example.module to begin.

As far as a tutorial to 'customize it', there are fifty-thousand things that folk may want to do to their site, many of them immediate and important, but very few of them the same as everyone else. Each step you take may be called 'customizing it'

Try stepping through the lesser-known bits of the handbook - the post-installation 'special cases' and the FAQs. There's a howto for lots of things, but you have to break down your request into tiny, specific questions, or you're just another guy who's blundered in saying "tell me how to build a website!"

You didn't even try to describe what type of "custom" form you are wanting - a submit form, a search form, an edit form, a mailto form, a contact form, a calculation form, an admin form, an interactive ajax form ... so there is no short answer.

.dan.

http://www.coders.co.nz/

irishsuperfly’s picture

Have you looked at the webform module? Depending on what you mean by "custom", that might work for your needs.

cgseymour’s picture

Thanks for the replies. I will look at webforms. That may do the trick. I am still getting used to "thinking in Drupal". I have been using Dreamweaver for quite some time and am begining to use Drupal more for client work.

Thanks again.

Chris