fields have show up/down arrows (increment/decrement), how do I remove these (in Drupal 8) without using javascript?
A client asked to remove the up/down arrows to prevent accidental changing of values. I've tried adding a…
I'm intrigued by the idea in this article: "Mad Libs" Style Form Increases Conversion 25-40%. I'd like to test such a form in place of the registration form on a couple of Drupal sites; however, I'm not sure how to approach such an unorthodox form…
I have a Drupal module page where I am populating a form with a drop-down that contains a list of available parts of a set of files that the user can upload. Once the user uploads a file of a certain type, it removes that option from the list, and…
I am handling file upload field in a form using Drupal 6 form APIs. The file field is marked as required.
I am doing all the right steps in order to save and rename files in proper locations.
upload form
$form = array();
....
$form['image'] =…
I want a simple filter form, and a table below it. When the user changes the option on the select form, the table automaticaly changes. I think thats done with ahah.
I want this (some things can change, like the fieldset containing the table, and…
Is there anyway say Drupal to validate form elements like email fields, passwords, numeric fields validate automatically lets say bind a system validator
$form['email] = array(
'#title' => t('Email'),
'#type' => 'textfield',
'#validate_as'…
I'm building a form in Drupal that needs to submit to a 3rd party website. Within the form API it seems like this is not really possible as you register form submission handlers to do all of the processing. I need to have the form method to to POST…
I am using form_alter to edit the submit function when editing content. In my custom function I wish to edit a custom message to the screen with the title name. I thought a way I could do this is something as follows
function…
I have a content type and I wish to edit the submit function. I thought the way you would do this would be as follows:
function moduleName_contentType_node_form_submit($form, &$form_state){
drupal_set_message(t('Test'));
}
I cleared the cached…
I want to add a new item into an existing form. I have the ID of the form and I know I need to use hook form_alter but not sure how to add it.
function modulename_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
case 'form…
I am creating a "sticky" checkbox for my content type "news". this means that one news node is sticky, and is used in a banner like box.
This is marked by a checkbox int the cck create content form.
The checkbox is handled by the node_api,
so I…
I have a drupal form which i post using jquery when you select an option from a selectlist (a sort of quicksearch selectlist).
The porblem is that when i submit by clicking the button, it works.
When I use jquery, and the button is in the form…
One of my developers wanted to override some functionality of the core user module. He made a copy of the core user module and placed it in the sites/all/modules folder. Something in the functionality screwed up and now I am not sure how to…
I need to display some custom HTML/Processing code before a Drupal form can be shown. How do I return both the custom HTML and the form? The code I have is:
function myfunction() {
global $base_path, $base_url;
$output = ""; // Clear the…
The submit handler gets the same form values no matter what I put in the form. Why???????
function edit_schoolinfo_form() {
global $user;
$result = db_query("SELECT * FROM {db} where userid=%d", $user->uid);
$sas_school_info =…