| Index
» Projects
» phpMyEdit
» Forum
» Required option not working |
 |
guardian46
Joined: 31 May 2005
Posts: 34
Posted: 2005-09-23 22:57
Back to top
Reply with quote
|
Greetings,
I am trying to use the 'require' option along with ['values'], like this:
| Code: |
$opts['fdd']['IDLoginName'] = array(
'name' => 'UserID',
'select' => 'D',
'required' => true,
'maxlen' => 8,
'sort' => true
);
$opts['fdd']['IDLoginName']['values']['table'] = 'lnofficert';
$opts['fdd']['IDLoginName']['values']['column'] = 'IDLoginName';
|
But the required part is not working, users can skip this column. I found Bug#0000001, as closed, and it states this is resolved in the CVS. I wonder if it has crept back in? Or if this might be due to the MCE-CAL extension?
My Class file:
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.167 2005/04/03 09:55:38 nepto Exp $ */
And using the mce-cal extension:
* extensions/phpMyEdit-mce-cal.class.php - phpMyEdit
* Updated 28th Jul 2005
Any help would be appreciated. Thanks
|
ajh
Joined: 17 Dec 2003
Posts: 236
Posted: 2005-09-25 11:13
Back to top
Reply with quote
|
Hmmm....I guess it's possible. I'll have a look at mce_cal.
|
ajh
Joined: 17 Dec 2003
Posts: 236
Posted: 2005-09-27 10:18
Back to top
Reply with quote
|
I'm pretty sure it's not the mce_cal extension. All of the 'required' logic is in the 'form_begin' function, which mce_cal doesn't touch.
|
guardian46
Joined: 31 May 2005
Posts: 34
Posted: 2005-09-30 15:09
Back to top
Reply with quote
|
Thanks for checking, AJH.
Okay, anyone else having this issue??
|
paolodp
Joined: 06 Jul 2006
Posts: 11
Posted: 2006-07-07 17:49
Back to top
Reply with quote
|
hello,
try this:
$opts['fdd']['IDLoginName']['js']['required']=true
regards
|
guardian46w
Joined: 26 Jan 2005
Posts: 2
Posted: 2006-07-11 19:48
Back to top
Reply with quote
|
Thanks for the suggestion, Paolodp.
I gave it a try, but users can still leave the field blank. As long as I have this
| Code: |
$opts['fdd']['IDLoginName']['values']['table'] = 'lnofficert';
$opts['fdd']['IDLoginName']['values']['column'] = 'IDLoginName';
|
the required option does not work.
Any help and/or other suggestions would be GREATLY appreciated!!
|
valedo
Joined: 31 Aug 2006
Posts: 6
Location: Ukraine
Posted: 2006-09-01 14:58
Back to top
Reply with quote
|
HI!
it is very important to use
['js']
Try this
'js'=> array('required' => true),
Example:
$opts['fdd']['category'] = array(
'name' => 'category',
'select' => 'T',
'maxlen' => 65535,
'js'=> array('required' => true),
'sort' => true
);
bye ^)
|
|
Post new topic
Reply to topic
|
|
|
|