17 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
1k
views
Ajax and hook_form_alter
I'm getting a "The value you selected is not a valid choice." error for an Ajax modified field when I submit a custom altered node/add form. An "Illegal choice error is also written to ...
user avatar
user4202824
0
votes
1
answer
1k
views
Drupal file_validate_extensions for file attachment extension using hook_form_alter
I built a module that alters form with the function called form_mods_form_alter.
I want to only allow jpg, jpeg, png file types. What I have is not validating. It's allowing gif and I don't want to ...
0
votes
1
answer
557
views
Drupal 7 change block subject in template.php
I have a block in my page and that block has a title. How can i remove this title (subject) within template.php? I tried hook_block_view_block_alter() but it doesn't seem to work? I could add a space ...
1
vote
2
answers
321
views
Registration during content creation in Drupal?
Is there an easy way to allow a user to register as he creates content type. E.g. Let's say there is a content type called "listing". When the user clicks to on a link to create it, and he's not ...
4
votes
2
answers
318
views
How do I update a node (book or Page) before saving it without touching the module code in Drupal?
I would like to set some values in the node before actually writing the data to the DB. I already have it working by modifying book_nodeapi but I would like to do it from outside the code, some _alter ...
4
votes
2
answers
3k
views
Default values for Content Taxonomy fields in Drupal with Hierarchical Select widget
I'm trying to set the default value for a Content Taxonomy field in a hook_form_alter, but can't pin down the necessary format. I've tried this and many variations:
foreach (element_children($form) ...
3
votes
3
answers
1k
views
form layout in drupal from a module
I created my own module called "cssswitch". I'm trying to create my own html layout to display the admin form portion of the module. I understand how to use the hook_form_alter() to modify form ...
14
votes
5
answers
22k
views
Checking whether a user already exists in drupal
When a user enters his login information and hits submit, i want to check if the user already exists or not.
So, i have the following two questions
1. Which hook is needed to be implemented , for the ...
0
votes
2
answers
2k
views
Validation on user registration form?
i have made module in which i am trying to add validation like if the user had entered the characters in "Phone No" text filed and same on "Mobile No".
This will run when user had open the user ...
1
vote
3
answers
5k
views
Getting altered form values in drupal
I created one module in drupal name as newmodule.I use form alter to alter user registration form for adding one field location.When i submit the form, how i can get the value of the new field which i ...
0
votes
1
answer
467
views
Problems in user - registration module in DRUPAL
I have some problem in drupal registration page.
I want to change whole user registration page. in registration module i want to add new field type. Bcz i want that user can choose the date from date-...
0
votes
1
answer
5k
views
Drupal hook alter with hook validate
I have a CCK defined form called 'mytype_node_form'.
I create a module called form_overrides
I create a function called form_overrides_form_alter where I successfully check for $form_id = '...
0
votes
2
answers
919
views
Drupal: collapse CCK Fields in edit content pages?
can I collapse the field in my edit-content page in Drupal ?
For example, at the bottom of the page Revision Information, URL Path Settings, Authoring Information etc are collapsed.
I would like to ...
2
votes
2
answers
1k
views
drupal module alter view or node
I have been using hook_alter to modify forms in a custom PHP module. I started to take the same approach modifying the result page of "node add" form. However this page is not a form so I don't have ...
3
votes
3
answers
4k
views
Drupal: adding disclaimer text above the submit button in a webform
Is there an easy-ish way to modify the webform-form-tpl.php template to show disclaimer text above the submit button in a Drupal webform? I can add text below the button, but do not know how to split ...