Forms are the primary method for obtaining and acting upon user input in Drupal.

learn more… | top users | synonyms (1)

2
votes
2answers
35 views

Collapsible fieldset is duplicating it's #prefix and #suffix value

Recently when I was working with collapsible fieldset in drupal 7, I need to add some div wrappers to them. So I go by adding #prefix and #suffix on that form field but when I view the html source it ...
0
votes
0answers
16 views

Form wont submit using AJAX when logged out

I am trying to submit the Add To Cart form using AJAX, I have altered the form like so: function ajaxcart_form_alter(&$form, &$form_state, $form_id) { if(strstr($form_id, ...
0
votes
1answer
12 views

How to get specific fields in the login form

I'm trying to customize the login form. I added this to my template.php function neptune_theme() { $items = array(); $items['user_login'] = array( 'render element' => 'form', 'path' ...
0
votes
1answer
14 views

Can't set options on form ajax callback

I have created a custom form in a custom page in the admin of my Drupal 7 site. On this form I have two sets of radio buttons (cities and sectors). I want it so that when I change the cities radio ...
0
votes
2answers
34 views

Drupal 7 custom submit handler not getting triggered

I am having a problem connecting a custom submit handler to a form. I am trying to switch off redirecting after the save of an eck entity on edit form. But i am not getting that far as my submit ...
0
votes
0answers
6 views

Send private message - Subject and message filled in

I'm using the module Privatemsg to give users the possibility to send messages to other users on the website. What I would like to do is: A button on the detail page of node with type equal to ...
1
vote
2answers
25 views

Add placeholder in registration form and removing labels

I wanna customize my registration form on drupal 7. I wanna add placeholders and remove the labels. How can I do that? Thank you
0
votes
2answers
18 views

Registration and Login form having different styles

I'm trying to style the login and registration form in different styles in my drupal 7 website. By default they share the same styles. Is there any way to change that?
0
votes
0answers
11 views

Entityform multi check boxes only first selection comes in email

I am using the Entityforms Module for forms. I have a simple form with textfields and a checkbox multi-select field. When you check more then one checkbox, only the first one comes through the email. ...
0
votes
0answers
12 views

Add ajax form submission in a panels content type pane plugin at render time

I'm writing a CTools Content Type Plugin for use as a Panels pane, specifically for output the existing user login slightly modified. Everything is working fine - but I want to add AJAX functionality ...
0
votes
0answers
21 views

Item list added by “Page_alter” disappear

I added a list item by HOOK_form and HOOK_page_alter. After cache cleaning, the list appeared and it did the job but when i changed page, this list disappeared for no reason. She never returned on any ...
0
votes
0answers
20 views

How to validate input data that are previously saved?

I am creating a module that can store user input in db and populate in a listing page with validation. I am collecting all values before submit i.e. any change in any field I store the form state in ...
0
votes
0answers
14 views

Override login form style

How do I style the login form in the zen sub-theme neptune. I'm kind of confused if I'm supposed to override the css styles. I'm not able to figure out how to change the login form wrapper div and the ...
0
votes
1answer
20 views

Add and customize login block on page.tpl

I'm trying to add the user login block in my page.tpl file. I've tried inserting the following code but the only thing I see is the username, password and submit fields. The "Register" and "Forgot ...
0
votes
1answer
17 views

File upload empty in custom form

I have a really simple form with a file upload. It actually used to work until I recently noticed it's not saving the file. When I check for the submitted values, the file field is empty, but the file ...
0
votes
1answer
21 views

Customize login block's position in page.tpl

I'm trying to position my login block in my page.tpl file. Everytime I insert the code <?php print drupal_render(drupal_get_form('user_login')); ?> in my page.tpl file. It throws an error. ...
0
votes
0answers
12 views

drupal_validate_form not validating more than one time on listing page

i am using drupal_validate_form on a node listing page . it is validating it correctly only for 1st item after that it is not checking validation. here is my code foreach($result as $r){ ...
0
votes
1answer
12 views

Can't get module configuration form into modal

I'm writing my first Drupal 7 module. I've successfully created the block's html and integrated that with the home page. I've also succeeded in creating a configuration form fo the block. However, ...
0
votes
1answer
18 views

Not validating required validation

drupal_validate_form is not validating required validation when i was creating a node programatically . Can any one say, it is design like that or am i doing something wrong . $node_form = ...
0
votes
0answers
13 views

Fill a field with a specific number when clicking on a link

I have changed my node.tpl.php file a little bit, <div class="content clearfix"<?php print $content_attributes; ?>> <?php // We hide the comments and links now so that we can ...
-1
votes
1answer
28 views

Any advice for dynamic radio butons

I need a form that has a radio buton field. The field must not hard coded. Options must created dynamicly. The form will be a block and get radio buton options from given chosed node field. For ...
0
votes
0answers
16 views

Form rendering causes title reset when viewing node?

I have a content type called "PRODUCT". Then I have a template: node--product.tpl.php In there I have: $form = node_add('enquiry'); $form = drupal_render($form); print $form; The problem is, now ...
0
votes
2answers
45 views

Re-use a form array multiple times

I'm a little stuck here. I want to make a block with 4 upload fields. So i'm trying to set the keys in 1 form array with the name file_link. When editing the block, I can see the 4 upload fields. But ...
0
votes
0answers
43 views

Problem with Ajax and Drupal form

I try to use Ajax in my form in Drupal. I had created a select list with some options. For the moment I just want to show a sentence with my choice in the list like "examples modules". The options ...
0
votes
0answers
12 views

file_validate_size doesn't seem to work

I'm currently learning how to make a custom module that creates a block with a textfield and upload field. So far so good, only thing is: Drupal doesn't seem to respect my file_validate_size value. ...
0
votes
1answer
24 views

Add block to form (before submit button)

I'm having problems placing a block in my form. This is what I have now: I have a register form and a fb button block. I say the block must be visible only when page is equal to user register page. ...
0
votes
0answers
11 views

Tags field with Drupal forms ajax

I need to do a form with select list and textfield. After user changes his choice in select list, this option is adding to textfield. It should work like "Tags" field on this site. I wrecked my brain ...
-1
votes
0answers
14 views

how to create filters of different content types which goes as contextual filters to the view on submit. I created a form inside a block

i am creating a form inside the block which adds a filter to the view on submit. I tried the above code and got stuck in storing the triggered value in a variable so that i can access them in another ...
0
votes
1answer
75 views

How to execute Drupal form without waiting? Ajax? Jquery?

I am trying to code one of my first Drupal modules and hitting this problem. I have a simple form in a custom module, that checks value of field_status and depending on if it is "down" or "up" ...
0
votes
2answers
24 views

Form in template without <form> tags

My forms dont seem to have tags wrapping them in my templates. What am I doing wrong here? I have a template whith some calls to theme() inside it. Two of these are forms with their own template. ...
0
votes
0answers
28 views

Making a form by having a view

I am trying to convert a view to a form as follows: I need to have a table of articles (which can be produces easily by views) and inserting a checkbox next to each row (article), and a button next ...
0
votes
0answers
17 views

Drupal 7 dynamically populating a select field depending on the prior field value

As stated above, I am attempting to dynamically populate a select field based on the selection in another. The first field is dynamically populated with view names, and the second will hold the ...
0
votes
2answers
22 views

Rendering a form to a block

I have created a block named 'xyz'. I also created a form whose id is 'form-type-node-form' and i want this form to display in that block. How can i do this? please help me to get solution.
0
votes
0answers
17 views

Can I apply more than one ajax callback to a field?

I have the following code in hook_form_alter() $form['field_sector']['und']['#ajax'] = array( 'event' => 'change', 'wrapper' => 'sub-sector-wrapper', 'callback' => ...
0
votes
0answers
19 views

Pre fix field_type in Drupal Node Add public form

I'm using this: How do I embed a node creation form inside a view (top rated answer) to implement a node add form for front-end users in an iframe. Now everything works perfect with: <?php ...
0
votes
1answer
18 views

Attach a form input to a node that will be submitted by multiple users

I'm trying to create a content type that serves as a "Contest". Each contest needs the ability to upload an image by the user. Basically, I'm looking for the best way to attach a form field (file ...
0
votes
0answers
6 views

Druapl 6 - form summary preview (and edit) before final submission

I have developed a custom module which produce a form. The form works (information validation, adding to database etc.) alright, but I want to one more feature to the form. Once the form is filled ...
0
votes
0answers
12 views

How can I update the visibility of a conditional textarea on the ajax form of a views plugin?

If I use the following code implementing views_plugin_style(), the form works properly except that I have to save the setting then reenter the form to see the textarea. I would like for the textarea ...
0
votes
1answer
26 views

Form validate without submit action

I'm developing a site that it will use Services for the CRUD operations and ANGULARJS for the comunication frontend <-> backend. Now when I want to insert a new content of content type FOO I will ...
0
votes
1answer
33 views

How to get attributes of the form elements?

I know that it should be easy, but currently it doesnt work. In my function I want to get #title of each element in the form. My form is fieldset "add_company". For example, when I try to get #title: ...
0
votes
1answer
25 views

Submit data into database

I have read a great deal and trying to learn how to get data into a table in the db. I have the below code to test entering just the first name of someone and I am getting an error. I have tried to ...
-3
votes
1answer
29 views

Add content form in a block

I want to add content form in a customized manner. For example consider Twitter is a custom content type i want a create a add new tweet button and display only the body field hiding the title and ...
0
votes
1answer
20 views

Need help on adding options to $form via select field

I altered the username field in login block into a select field and now I'm trying to filter the usernames by their user roles via another Select Field. function design_form_alter(&$form, ...
0
votes
1answer
20 views

How to save a form inputs in database and retrieve it from database with out form submision

hi can i store form inputs in database and retrieve it from database with validation I search many sites but neither any documentation or example or any thing i found for drupal7 . I didn't ...
2
votes
1answer
99 views

Bootstrap tooltip form inline errors

I tried "Inline Form Errors" module but it add errors message content after form element. How to add inline form errors with bootstrap tooltip or popovers directly to inputs and selects? Does somebody ...
1
vote
2answers
22 views

add variable to process_page($vars) in form function

Is there an option to change $vars array in form function? I would like to pass some variables to page template in form creation function .. If not, what are other options to influence page.tpl from ...
0
votes
1answer
20 views

How do I alter the file link of an uploaded image in edit/create node form?

When I upload an image in drupal, a file icon and a file name that links it to original file is created. For example, I upload "foo.jpg" then <a href=path-to-file>foo.jpg</a> is ...
0
votes
0answers
9 views

What would be a good way to add a list with selectable values to an xml form?

I am pretty new to drupal and am trying to figure out how to allow a user to apply "tags" to an item via the XML form (created by the formbuilder tool). The list I have is expandable/collapsible with ...
0
votes
1answer
56 views

How to add markup inside a form radio button div

Currently I have a form displaying radio buttons and I added some markup to it by attaching #suffix to the form element. However, I found that this didn't do exactly what I needed. This created the ...
0
votes
1answer
29 views

How to show validate error of a node listing page

i am trying to save form state in database and want to view in a listing page with its error validation. i.e, i want to validate a previously saved form state from my database. this is a node type ...