Tagged: validation
- This topic has 0 replies, 1 voice, and was last updated 1 year, 4 months ago by
shoemaker.
-
AuthorPosts
-
-
October 7, 2020 at 12:15 am #10976
shoemakerBlockedI have a group field with add_more and a validate that works. When an entry fails validation, piklist doesn’t highlight it unless it’s the first, or *top* entry in the group. By default, add_more adds *below* an existing entry, so when the data entry error is in the second entry, it’s not clear to the user which field failed. If I drag the entry to the top of the group, the correct field is highlighted.
Here’s the field definition and screen shots of the bad entry at its default position and dragged to the top to check again.How can we get the right field to highlight?
Piklist Version 1.0.10
I get the following error in the apache log:
[Tue Oct 06 22:08:58.799199 2020] [proxy_fcgi:error] [pid 1939:tid 140073965152000] [client 24.20.203.62:60450] AH01071: Got error ‘PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in <snip>wp-content/plugins/piklist/includes/class-piklist-form.php on line 2944PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in <snip>/wp-content/plugins/piklist/includes/class-piklist-form.php on line 2944PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in <snip>/wp-content/plugins/piklist/includes/class-piklist-form.php on line 2944PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in <snip>/wp-content/plugins/piklist/includes/class-piklist-form.php on line 2944PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in <snip>/wp-content/plugins/piklist/includes/class-piklist-form.php on line 2944PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in <snip>/wp-content/plugins/piklist/includes/class-piklist-form.php on line 2944’, referer: https://<snip>/wp-admin/post.php?post=NNNN&action=edit&_%5Binvalid%5D=6ca7417ef5piklist(‘field’, array(
‘type’ => ‘group’
,’field’ => ‘payments’
,’add_more’ => true
,’fields’ => array(
array(
‘type’ => ‘text’
,’label’ => __(‘Fiscal Year’)
,’field’ => ‘fiscal_year’
,’columns’ => 9
,’validate’ => array(
array( ‘type’ => ‘fiscal_year_number’
)
)
)
,array(
‘type’ => ‘text’
,’label’ => __(‘Amount’)
,’field’ => ‘amount’
,’columns’ => 9
)
,array(
‘type’ => ‘text’
,’label’ => __(‘Check Number’)
,’field’ => ‘check_number’
,’columns’ => 4
)
,array(
‘type’ => ‘datepicker’
,’label’ => __(‘Date Posted’)
,’field’ => ‘date’
,’columns’ => 4
,’options’ => array(
‘dateFormat’ => ‘M d, yy’
)
,’attributes’ => array(
‘size’ => 18
)
,’value’ => date(‘M d, Y’, time() + 604800)
)
)
));Attachments:
You must be logged in to view attached files.
-
-
AuthorPosts
- You must be logged in to reply to this topic.