Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  multiple required fields help

phpMyEdit Configuration     multiple required fields help
Odoslať novú tému   Odpovedať na tému    
 
scorpitron     Založený: 30.04.2009   Príspevky: 3  
Príspevok Zaslal: 2011-02-16 01:07
Návrat hore  Odpovedať s citátom     

hi, searched around could not find answer.

i need to make nearly every field required when adding a record.

i did this:

Kód:
$opts['fdd']['CUST_REC#'] = array(
  'name'     => 'CUST REC#',
  'select'   => 'T',
  'maxlen'   => 40,
  'sort'     => true,
  'required'   => true


worked perfect if a user fails to enter in they get pop up box.

but when i try to do that to multiple fields/columns it stops working. basically if i try to apply that
Kód:
'required'  => true
to 1 field it works, more than 1 field and none of it works.

also, all of my fields are as simple as the code i copied, nothing fancy.

any help would be greatly appreciated.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2011-02-16 07:04
Návrat hore  Odpovedať s citátom     

Problems relate to CUST_REC#

No matter what characters MySQL says might be valid when naming columns, tables, and databases, usage of anything other than lower case a-z (optionally followed by 0-9 and the underscore character) amount to shooting one's self in the foot.

The # character is probably what's causing your problems.

http://www.hockinson.com/index.php?s=36

 
scorpitron     Založený: 30.04.2009   Príspevky: 3  
Príspevok Zaslal: 2011-02-18 00:13
Návrat hore  Odpovedať s citátom     

thanks heaps! moved all things to lower case fields on mysql side + got rid of special chars and its all gravey now.


never would have figured that out, i have a few other db's linked to myphpedit but this is first time i needed to make a field required so those chars never screwed me before :)

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2011-02-18 00:24
Návrat hore  Odpovedať s citátom     

Probably better to define the field as an ENUM using phpMyAdmin and set the values there, then recreate the form. Assuming the options don't change often.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov