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 case when user hits the submit button on the…
I am trying to modify some Drupal 6 form code and incorporate some native form validation. Code looks like this, but validation does not work. I never even get into function thisFormName_form_validate. Any Drupalians have some good ideas?…
I'm building a form module. One of the early fields is a set of radio buttons. By default the first button is selected. Next I'll have a series of select boxes. One needs to be visible, the others invisible. Then as the user selects a different…
I am trying to have a button which is not a "submit" type of button, but rather a normal "button" type, using the forms api of drupal 7, but I can't seem to get it.
I've tried many things, like setting #type to 'button', setting #button_type to…
Is there any core function to get uid from username in Drupal?
Or I should perform a db query?
my field is a textfield with '#autocomplete_path' equal to 'user/autocomplete'
I need to apply style and read-only property to an input element of a drupal form.
I coded the following:
$form['precio'] = array(
'#type' => 'textfield',
'#title' => t('Precio'),
'#default_value' => ''.$precio,
'#size' => 20,
'#required'…
I want to add title="icons/icon_cart.gif" for each of the below options in my select list which is rendered using views.
After trying and reading many articles I can't seem to find the way to add this html into my form.
Below is my code.
function…
For some requirement I need to pass additional information to form submit handler. In form api, while defining custom submit handler as
$additional_args = array();
$form['#submit'][] = 'my_submit_handler'
I expect to submit handler as
function…
How would I print the results of a form submission on the same page as the form itself?
Relevant hook_menu:
$items['admin/content/ncbi_subsites/paths'] = array(
'title' => 'Paths',
'description' => 'Paths for a particular…
I'm making a module to allow users to update single fields on in this case, their user entity.
The code below is an example of the method I have initially been using to get it working and test other elements of the module
global $user;
$account =…
Sounds like a simple question. I've added a bit of jQuery magic:
$("#edit-save").click(function(event) {
$(this).attr("disabled", "true");
});
However, once this is in place, my form submit handler doesn't get called.
This is a custom form on my…
When I create a node I want it to programmatically create some nodes that reference the node just created.
I though I would just need to change form_alter submit function for my form to call a custom function to create the nodes.
Examining the…
OK so this is my hook form alter function.It is causing all the registration forms on site to be over written which I do not want as I just want it on this page.
function special_registration_form_alter(&$form, $form_state, $form_id) {
if…
I want to create an input form for registered user, separated from admin's content creation form. Each submission will create multiple node.
To illustrate the case, I will use content type Project, and Review.
Project: Title, Description, Owner,…
I have a web form with name and email fields. when the form is submitted the name and email should store in database and an PDF file should start download.
my question is how to override the submit function of the web form so that i can add that…