Drupal 5.1 with cck, location module
I cannot print the fields used with the location module (street, postal code, city, country)! I'm ableto print cck fields, but I'm not interessted to create new fields (street, city, poststal code) which should be created with the location module. Am I getting this wrong - any clues?
My user_edit.tpl.php has this:
Address information
print drupal_render($form['street']); print drupal_render($form['postal_code']); print drupal_render($form['city']); print drupal_render($form['country']); Using print_r($node); I can see the fields names and they seem correct. But in some array I think. I did not get this line to work as shown in the tutorial: print ""; print_r(array_values($form));print "";
Br,
Dan
Comments
Comment #1
greenskin commentedIf you have the Devel module installed enter the following in your tpl:
dprint_r($form);
Else, if you don't have Devel try:
print "
";
That will give you the array structure so you can supply the appropriate keys to get the values you need.
Comment #2
greenskin commentedSorry, I should have used the php tags to make that easier to read. I try again...
If Devel...
Else...
Comment #3
greenskin commentedLOL, one last post hopefully. I keep submitting too soon.
My examples use $form. That should be $node for in the tpl.php.
Hope that helps. Also, if anyone knows how to edit comments here, I'd appreciate it if you let me know. :P
Comment #4
yesct commentedI think this is asking about how to theme the form. If someone could verify that is the request, and maybe point to another issue which addresses the solution, please do.
Comment #5
yesct commented#378622: Make Location form fields available to hook_form_alter() sounds related but for 6.x
Comment #6
yesct commentedthere are some other location theming issues, adding a tag.
Comment #7
rc2020 commentedOn Drupal 6 version, line 1686, there's this code:
After the //**HACK**// I added this code to get a wrapper around the location box, allowing for extra theming. You can use this class (or make it ID) to force lengths and colors of form items. There are individual form items which you can add these attributes to. The http://api.drupal.org/api/file/developer/topics/forms_api.html/5 form helps out with alot of the things you can do with forms.
Comment #8
yesct commentedComment #9
Berliner-dupe commented@corona ronin and all
It is possible to theme every field alone in Drupal 6? [city], [street], [postal code]?
I will add a jQuery-Plugin to the city-field but i dont know how i can make this.
Has anyone an idea?
Thank you and Regards
Matthias
Comment #10
Berliner-dupe commentedI make a new Issue!
http://drupal.org/node/906670