Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 450075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:49:58+00:00 2026-05-12T21:49:58+00:00

I am just starting out with Drupal but I am pretty clueless how to

  • 0

I am just starting out with Drupal but I am pretty clueless how to custom ‘place’ all of the form elements. I usually have a lot of stuff, like this other dude’s thing, so placement and aesthetics are a MUST:

alt text http://img20.imageshack.us/img20/3103/55744697.jpg

Drupal’s default way of rendering forums like a questionnaire (one long horizontal column with lots of spaces) are unacceptable for my purposes. I have been looking around the Drupal forums and several other people all have the same problem. The main approach seems to be to return a long concatenated string of html and php controls – for my forms, that would be insane! What is the easiest and cleanest solution to this?

Is there a way, like in ASP.NET with the page.aspx/page.aspx.cs, all the markup and controls are in one file and the code in another? Or maybe I can put all of the form markup in one file with just placeholders, and in the code, it tells Drupal to render each form elment in it’s placeholder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:49:59+00:00Added an answer on May 12, 2026 at 9:49 pm

    I don’t know windows much, so I can’t really relate to the .NET techonology example you made, but for what I understand you would expect to have each field of the form passed into the page template as variables, and then be able to place them in a PHP template…

    …if this is the case, then Drupal does not behave like that, or – to be more precise – it doesn’t behave like that with forms. Forms arrive to the page template as HTML and you have to use CSS to format them according to your needs. The HTML is pretty well structured, with each field in it’s own <div> and a few handy classes that make theming easier. If that is not enough, for meeting your needs, you can intervene on the process generating the forms beforehand with a series of hook.

    Indeed Drupal has a very specific Form API (or FAPI) to deal with form creation, manipulation, validation and submission. It might sound too complicated for a newcomer, but the FAPI is indeed a key-element to Drupal highly modular design.

    You may have a look to this answer from earlier this week, as that might be useful for you to get an idea of how the FAPI system works at its core. If you are a newcomer to the world of Drupal I would suggest that you take some time for reading the documentation, especially the theming guide and the hooking system. Drupal requires to have quite some knowledge of its inner workings in order to be an agile platform to develop for, but the outcome from the investment in “studying” is – IMO – well worth the effort.

    On another note: if you are struggling to start with your forms from the scratch, you might be interested in having a look to the webform module (doesn’t work for all needs, but is a pretty commonly use tool).

    HTH, and welcome to the complex but rewarding world of Drupal! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just starting out with my first commercial app for the iStore but dont have
I'm just starting out with JQuery in a Drupal environment. I have some thumbnails,
I am just starting out with Objective-C but have done a bunch of C++.
Just starting out with subversion, have set up repos for 3 current projects and
Just starting out, this should be a simple one but I haven't been able
I'm just starting out with Core Data and I have an iPhone Core Data
I'm just starting out with Java, but my boss is pushing for this. I've
I am just starting out with ajax...trying to submit a form with ajax through
Just starting out in Unix and need t workout this:- I have a csv
im just starting out with javascript so go ez on me. i have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.