Skip to main content

All Questions

Tagged with
29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
403 views

Globally increase #maxlength attribute of textfield (form api)

I have thousabds of field for admin to edit data which is saved in db from mobile app. i can fetch those data into text field while editing but drupal having default #maxlength of 128 character but in ...
Mukesh Gami's user avatar
2 votes
1 answer
452 views

Custom template for each profile2 profile type edit form

I am working on a Drupal 7 site and for a few days now, I've been struggling with this problem: I am trying to create a custom template for the edit profile form, but there are more profile types. I ...
Stavovei Ciprian's user avatar
2 votes
0 answers
383 views

Problem with theme registry rebuild and drupal_get_form in a block

I'm calling a form from a custom block and having real problems getting it to function with theme registry rebuild on each page load turned off. With the registry rebuilding every page load this ...
sambonner's user avatar
1 vote
1 answer
516 views

How to wrap / manipulate element outputs on a form's checkboxes html?

I have the following form that contains a big list of checkboxes. The first checkbox is the parent of the children below it. In my case it is called "Africa" and the ones below it are "Africa-child" ...
Patoshi パトシ's user avatar
1 vote
1 answer
112 views

Theme specific form field for custom content type

I have created a custom content type and added some fields to it. I want to theme one of the fields which I added from the "Manage Fields" section. I want to remove the div wrappers when the form ...
Villie's user avatar
  • 311
1 vote
0 answers
86 views

Managed_file images disappearing after form resubmission

I'm building a site using the Nexus theme, and wanted to give users the ability to change the slideshow images using Drupal rather than using the default FTP (which is an odd way to make people update ...
Kevin Cull's user avatar
1 vote
0 answers
76 views

context condition for field group multipage

I have a node form configured with field group multi page, my node form is outputted as a block on the front page. I want to disable(hide) the rest of my front page blocks when the user is on the ...
ducu's user avatar
  • 11
1 vote
0 answers
489 views

Inserting custom social media icons to nav.bar ( tb-megamenu )

I have been playing around all day and have been trying to get my social media in my navigation bar to the far right for people to click on and be directed to my social media account. I am using tb ...
user34253's user avatar
1 vote
2 answers
162 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 ...
gregab's user avatar
  • 507
1 vote
1 answer
1k views

How to create an Enquiry form with ability to submit a collection of enquiries

I am building a new site which has a large selection of different products/services on offer, the information for each is shown in it's own node. If the user has interest in a number of these ...
leeboyce's user avatar
  • 141
1 vote
0 answers
379 views

user--register.tpl - show validation error messages

I have overwritten theme of registration form using the file user--register.tpl But when have some validation in the form, I cannot see error messages. How can I display error messages generated with ...
tomas.teicher's user avatar
1 vote
0 answers
2k views

How to wrap managed_file Form API element with custom HTML using #theme_wrappers?

I'm using Drupal 7.23 with no core hacks. I have form element for logo: 'logo' => array( '#title' => t("Logo"), '#type' => 'managed_file', '#description' => t('Allowed extensions: ...
Mołot's user avatar
  • 21.9k
0 votes
1 answer
106 views

Autocomplete field where title is replaced with NID

I'm using Drupal 7 and I have made autocomplete function to be called on a field. File my_module.module: <?php function my_module_menu() { $items = array(); $items['/...
Marko Basta's user avatar
0 votes
1 answer
198 views

How can I show only webform content by excluding header,footer?

I wan to show only the form elements in an modal(popup), but am not able to achieve that. Along with the form elements header, footer is also showing. So how can I remove those things for specific ...
Suraj's user avatar
  • 884
0 votes
1 answer
483 views

How to pass theme variables in #theme in a form element?

I need to pass product variable defined in hook_theme() and invoked in #theme but not sure how to pass product variables in #theme Please suggest. function storeinv_theme() { return array( ...
harshal's user avatar
  • 4,354
0 votes
1 answer
251 views

Open preview in new window/page

I'm using drupal 7. Normally, during the creation of a contents, the preview is added above the form. I would wish that the preview opens in a new window, and that it is separated from the form of ...
Fluidouix's user avatar
  • 101
0 votes
0 answers
43 views

How to theme or override forms when using Panels

I am using Panels in my website. there is a page user/$username/edit which enables the people to edit their profile. I tried the following code to theme the user_profile_form form. Template.php ...
M a m a D's user avatar
  • 3,837
0 votes
0 answers
24 views

Share webservice output between tpl

I have a specific tpl being defined within the theme and the specific view function contains a function that calls the webservice. It saves it within the items array which then outputs as variables ...
jagmitg's user avatar
  • 161
0 votes
1 answer
40 views

Static form to print on TPL

I have created a module i can use to create multiple blocks, now with one of those blocks, there is a requirement for a form (which the user needs to be able to see). However, this does not require ...
jagmitg's user avatar
  • 161
0 votes
0 answers
25 views

How to process form in template when you aren't printing the entire form

I have a form where I am only printing out certain parts of it because I want to style around them. i.e. <?php print drupal_render($variables['form']['field_city']); ?> However, when I try to ...
Jack Ryan's user avatar
  • 2,307
0 votes
1 answer
42 views

Form With Inline Input Boexes

I am trying to create a form that will have the input boxes inline and next to one another. I have created the following module but nothing seems to help. Can anyone help to solve this issue? Also the ...
John's user avatar
  • 215
0 votes
1 answer
619 views

How to get the managed_file progress bar working in a custom theme?

I'm trying to get the managed_file progress bar working in a custom theme. Right now, when I start an upload, the empty progress bar widget appears in the form, but it doesn't visually update while ...
Jim Miller's user avatar
  • 1,948
0 votes
1 answer
856 views

Use form_alter to change description under reset password field for user_pass form

I'd like to change the text below the reset password field. I took a look at this answer, and it talks about changing the button, but I need a bit of help to change the text. Here is the debug output ...
Dan's user avatar
  • 696
0 votes
2 answers
636 views

Save form when user refreshes page from browser or click on any anchor tag inside page

I have made a form in drupal. What I want is when the browser unload the page from any click whether by clicking on anchor tag or from browser refresh buttons I want to save data of my form through ...
Pradeep's user avatar
  • 35
0 votes
0 answers
1k views

Ajax not working for themed form

I have a form for which I want to theme with a template file, and I also need to use ajax in it. But I get this error messages in the log and ajax doesn't work : message 1 Invalid form POST data. ...
Youssef Bouhjira's user avatar
0 votes
1 answer
229 views

Error in Submit handler for custom node add form

Trying to theme my own node add form with hook_theme() in my own module. In the *.tpl.php page for the node add form, submit button is not actually adding the content to database. Issue: Why is "php ...
drupalmav's user avatar
  • 565
0 votes
0 answers
240 views

AJAX-form replaced div comes back empty when logged out

I have an AJAX form that replaces a section of itself successfully when the user is logged in. But when logged out, the demo-area section comes back with the #prefix and #suffix but no item-header or ...
Joe Beuckman's user avatar
  • 1,111
0 votes
2 answers
643 views

Add class to all labels in a comment form

Pretty straight forward. For every label within a comment form, I wish to add a particular class to it. Using only functions in template.php, in Drupal 7, how can this be done? If it can't be done ...
Lester Peabody's user avatar
0 votes
1 answer
768 views

Bootstrap horizontal form layout

In Bootstrap there is a nice horizontal form option. But in Drupal + Bootstrap base theme I couldn't find any ways to use this horizontal forms and layout form elements as it described, eg. col-2 for ...
Timophey Popov's user avatar