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

learn more… | top users | synonyms (1)

0
votes
0answers
9 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
9 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
17 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
11 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
16 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
16 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
18 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
9 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
17 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
11 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
17 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
15 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
39 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
11 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
21 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
74 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
22 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
27 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
16 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
16 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
31 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 ...
-4
votes
0answers
24 views

Geolocation map in castom form [closed]

I need to bring the programmatically into custom form field Geolocation map, then I can get the coordinates, who knows how it will look for my form?
-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
19 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
96 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
21 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
52 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 ...
0
votes
2answers
12 views

Ready-Only Select

On select of one dropbox, I have the values of 2 others updating automatically via Ajax/JS. This works, well, but I also want to disable the ability for users to change these values/ I tried setting ...
0
votes
1answer
32 views

Ajax field default value on edit form

I want ajax dependent fields in one of my node's form so I am altering the form. here is the code function mymodule_form_alter(&$form, &$form_state, $form_id) { $selected_first = ...
0
votes
0answers
23 views

Rebuild exterior elements of form on submit

On the user page I display two types of groups a user can be subscribed to: a pending membership or an approved membership. To illustrate this: The 'cancel membership request' button is the submit ...
0
votes
1answer
23 views

Form '#theme' preprocess doesn't invoke

I have form where '#theme' => 'ebanq_transfer_theme'. Template file is rendered but preprocess hook doesn't invoke. Any ideas? /** * Implements hook_theme(). */ function ebanq_transfer_theme() { ...
1
vote
0answers
21 views

Node edit form in overlay for selected content types

I am using Drupal's core Overlay module along with Overlay Paths to display certain forms in overlay pop up. I have three content types and for one content type I want the node edit form to appear in ...
0
votes
1answer
13 views

Unwanted data show after add password-comfirm

In my form I would like to add comfirm password field, the pic below show is before adding comfirm field, there is no data in waiter name field, after adding comfirm-password field there are data in ...
0
votes
0answers
7 views

Create a names and email field on comments in D6

I am trying to add extra fields onto the comments box in d6. Have tried this in my template.php file function mythemename_form_alter(&$form, &$form_state, $form_id) { if ($form_id == ...
0
votes
0answers
14 views

getting friends details from fboauth and display in form

I am using Facebook OAuth (FBOAuth) module to get list of Facebook friends. I have created a fboauth action which import the friends, then I create an array which contains details of friends (details ...