Posted by jebbushell on December 15, 2011 at 4:46pm
The form's purpose is to capture a postal address and I would ideally like it to look nice and like a standard US address, i.e. a little bit like this:
| Street: | Lickety Split Chicken Feet | ||||
| 100 Washington Ave | |||||
| City: | Oakland | State: | CA | Zip: | 99999 |
I cannot see an adequate tutorial on theming in D7 anywhere (the official one is really not helpful, here is the payload of its tpl.php file:
<?php
<div class="container-inline">
<?php print $text_form; ?>
</div>
?>Not a lot to catch a hold of there. Can anyone please offer a clue?
Thanks.
Comments
You may want to check out
You may want to check out some beginning guides to Drupal theming. Omega isn't blocking you from theming this form. To do what you want to do is pretty much the same no matter what theme you are using. This book has an entire section on theming: http://definitivedrupal.org/
Once you figure it out, you could add to the documentation what you learned.
Thanks. I have that book and
Thanks. I have that book and 3 others, all D7. My current feeling is that they all appear to give a fraction of the story and none of them has what I currently believe may be essential for something with so many moving parts and options: a checklist. When you adapt their approach to your problem, and it doesn't work, you might not be so thoroughly SOL if you had a checklist. Also, I had hoped that something as commonplace as a US name and address form might be standard somewhere. But you're right, this is not an Omega issue.
However:
If I wish to use a .tpl.php approach, and I am using Omega, then I should have the .tpl.php in ../sites/all/themes/-omega-xhtml/templates. Correct? Or should it go in the module directory, which is where I currently feel it ought to be, and which is where the themeing text form example has it?
If I were to attempt a theme override, same question for template.php.
If I succeed I will document. Rapidly running out of time though. A week already to (not) get a simple form to look decent. Crikey!
Thanks for your time.
Address field
The Address Field module puts the very fields in the form that you are looking for. It's also used with UberCart, so there is support for international addresses as well. http://drupal.org/project/addressfield
If you are going to modify the template.php, or the page or node templates, you really should make a sub-theme and make your changes there. That way when they upgrade Omega, you will get the benefits of the new features, without having to splice in your custom code. Making a subtheme sounds harder than it is. Directions are in the Omega documentation. If "-omega-xhtml" is the name of your sub theme,(including the initial dash) then, yes that's where to make the changes. But for me, I would name the subtheme something that is more different from the theme you are subbing ... like "thissitesname-omega-xhtml". It's just easier to keep track of that way.
Thanks again. The
Thanks again. The "thissitesname-omega-xhtml" formula is exactly how I did it, in fact. Just a typo caused by dithering. I'll look at AddressField.