File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
templates/SilverStripe/UserForms/Model/EditableFormField Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ These include:
8
8
- a * shortcode* with which to insert a user form into any content area;
9
9
- a * form widget* that presents a user form (requires
10
10
[ silverstripe/widgets] ( https://github.com/silverstripe/silverstripe-widgets ) );
11
- - various new * form fields* .
11
+ - various * additional validations* for existing form fields;
12
+ - various * new form fields* .
12
13
13
14
## Installation
14
15
@@ -43,7 +44,14 @@ You have the ability to customize display with the following options:
43
44
- **Show form content?** - Chose whether to display the content of the form
44
45
page.
45
46
46
- ## Form Fields
47
+ ## Additional Field Validations
48
+
49
+ ### Maximum File Size
50
+
51
+ The maximum file size for a form fields will now be checked prior to submission.
52
+ This is much more responsive for the user.
53
+
54
+ ## New Form Fields
47
55
48
56
This module provides a selection of new field types to use with your user forms.
49
57
Original file line number Diff line number Diff line change 1
1
---
2
2
Name : userforms-utils
3
- ---
3
+ After : ' userforms/*'
4
+ ---
Original file line number Diff line number Diff line change
1
+ <% require javascript('silverstripe/userforms:client/dist/js/jquery-validation/additional-methods.min.js ' ) %>
2
+ <input type=" hidden" name=" MAX_FILE_SIZE" value=" $MaxFileSize" />
3
+ <input $AttributesHTML<% if $RightTitle %> aria-describedby=" {$Name}_right_title" <% end_if %>/>
4
+ <script type=" text/javascript" >
5
+ jQuery(document).ready(function() {
6
+ jQuery('#{$ID}' ).rules('add ', {maxsize: $MaxFileSize});
7
+ });
8
+ </script>
You can’t perform that action at this time.
0 commit comments