All Questions
18 questions
0
votes
1
answer
1k
views
How to limit form submission per user per day and week?
The goal is very straightforward. I need a form to limit each user to 1 submission per day and 3 per week.
What I found:
Webform:
The "Form settings" in webform has the "Per user submission limit" ...
0
votes
0
answers
24
views
Field gets unset and fails validation in user edit form
We have a special date field that we set upon user creation when our custom user form is submitted. The user does not have to set this field themselves.
We have a separate form, which is a user edit ...
0
votes
1
answer
106
views
Date popup field won't display in tableselect element
I am attempting to embed a couple of date fields within a tableselect element, and after trying to use both textfield and date_popup field types, I can't get either to work. Here's my form function ...
0
votes
1
answer
856
views
How to set Form API date_select option values
Creating a date_select field in a custom form, like this:
$date_format = "Y-m-d";
$form['birth_date'] = array(
'#type' => 'date_select',
'#title' => t('Date of birth'),
'#...
5
votes
2
answers
1k
views
Setting date_popup year range to more than the 3 years default in Drupal 7
I have a custom module and using date_popup. Currently the popup only shows a 3 year range in the date popup.
$form['startdate'] = array(
'#type' => 'date_popup',
'#title' =&...
0
votes
2
answers
93
views
Change timezone display format in user edit page
In drupal 7 timezone field in user edit will be like Asia/Kolkata: Friday, October 9, 2015 - 17:24 +0530. I want to display it like Asia/Kolkata. I have tried the method specifed in https://drupal....
2
votes
1
answer
104
views
How to change timezone format for user/site settings?
I want to change the user configurable timezone format on the regional settings and user settings form.
For example, it displays as Asia/Kolkata: Friday, October 9, 2015 - 17:24 +0530 I want to ...
0
votes
1
answer
1k
views
How can I replace the date picker with a text field that shows a date picker when it has the focus?
I installed the Date Picker module, which works fine. This is what appears when I add the datepicker element to the form.
This is the code I use to add the datepicker element.
$form['date'] = array(
...
2
votes
3
answers
3k
views
How to set a value for a date field?
I need to set a value for a date field with type datetime in hook_form_alter. I tried with below codes. But it is not working.
$form["field_event_date"]["und"][0]['#default_value']['value'] = $...
1
vote
3
answers
495
views
How to change the label of the "To:" field in the Date Module
This doesn't seem to be the kind of thing you can change using hook_form_alter() unless I'm missing something.
The label of the "From" field can be any value you want, but the "to" field, if you have ...
1
vote
1
answer
176
views
date_popup + theme = infinite loop
I'm trying to create a templated form including date_popup field in a custom module. There is a very basic example : mkl_variousTest.module ( dependency : date_popup from date API )
<?php
//...
3
votes
0
answers
2k
views
Multiple date picker for date popup widget
I've been searching for a while, but didn't find any contribute module to store multiple date values picking them from only one date popup calendar widget, just a 2009 feature request for D6.
In D7 I ...
3
votes
2
answers
2k
views
Storing a date created with Form API
Very simply, I'm creating a date of birth field pragmatically like so:
$form['dob'] = array(
'#type' => 'date',
'#required' => TRUE,
'#title' => t('Date of Birth'),
'#...
3
votes
1
answer
2k
views
How to ajax changing date field on _node_form?
On content type called Order have 2 fields - "Category name" (term reference) and "Date" (Date (Unix timestamp)). On node edit form I want to change date to other value (for test purpose it is "hard ...
1
vote
1
answer
988
views
How to display date and time inside a form #markup?
I want to retrive a UNIX epoch (as returned by the PHP function time()) and display it as a formatted date as part of a text (i.e. a #markup element) in a form. This is not a field where the user is ...
1
vote
1
answer
599
views
How to make the date field of authoring information in Create Article page a date field?
In the page to create new article, at the bottom in the authored on tab, how do I make the date textbox to a date field with date picker? I mean, I want it to be easy for the publisher to choose ...
1
vote
0
answers
1k
views
How to use multi-value, full calendar date picker in node form?
Users previously reported vehicle use in an Excel sheet formatted to look like a full month calendar. Clicked cells in the "calendar" marked visual x's (via macro) on days they used a vehicle, and ...
0
votes
1
answer
112
views
Date #return_value to ordinary time()
So I have included a date field in my custom block form and would like to use the date.
However it is saved as an array which I am finding a little difficult to work with:
The format for "#...