Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
clientside_validation
Commits
78768b3f
Commit
78768b3f
authored
Apr 10, 2012
by
Peter Droogmans
Browse files
Setting moved to validation fieldset
parent
52a767ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside_validation_webform/clientside_validation_webform.module
View file @
78768b3f
...
...
@@ -364,10 +364,16 @@ function clientside_validation_webform_webform_validation_add_names(&$webform_va
function
clientside_validation_webform_form_webform_component_edit_form_alter
(
&
$form
,
&
$form_state
,
$form_id
)
{
$component
=
$form_state
[
'build_info'
][
'args'
][
1
];
$form
[
'
extra
'
][
'exclude_cv'
]
=
array
(
$form
[
'
validation
'
][
'exclude_cv'
]
=
array
(
'#type'
=>
'checkbox'
,
'#title'
=>
'Exclude from clientside validation'
,
'#description'
=>
'Check this option if you do not want to add clientside validation.'
,
'#default_value'
=>
isset
(
$component
[
'extra'
][
'exclude_cv'
])
?
$component
[
'extra'
][
'exclude_cv'
]
:
FALSE
,
);
array_unshift
(
$form
[
'#submit'
],
'clientside_validation_webform_webform_component_edit_form_submit'
);
}
function
clientside_validation_webform_webform_component_edit_form_submit
(
$form
,
&
$form_state
)
{
// Move settiing to extra
$form_state
[
'values'
][
'extra'
][
'exclude_cv'
]
=
$form_state
[
'values'
][
'validation'
][
'exclude_cv'
];
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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