Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
forena
Commits
5b4d8740
Commit
5b4d8740
authored
Jun 04, 2013
by
David Metzler
Browse files
Added propmpting for select fields so that they don't always default.
parent
45178804
Changes
1
Hide whitespace changes
Inline
Side-by-side
forena.module
View file @
5b4d8740
...
...
@@ -633,6 +633,11 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
//onto the array. options will cause an error for
//textfield elements.
if
(
$list
||
$type
==
'select'
||
$type
==
'radios'
)
{
if
(
$add_null
)
{
$prompt
=
@
$options
[
'prompt'
];
if
(
!
$prompt
)
$prompt
=
$required
?
'-select-'
:
'-none-'
;
$form
[
'params'
][
$id
][
'#empty_option'
]
=
$prompt
;
}
$form
[
'params'
][
$id
][
'#options'
]
=
$list
;
$form
[
'params'
][
$id
][
'#multiple'
]
=
$multiselect
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment