|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
QuickForm - Help with addGroup
Hello. Wondering if someone can help me with this QuickForm stuff.
I am using this to get the phone number into my database but all that shows up there is the word "Array". Code: [Select] $areacode= &HTML_QuickForm::createElement('text', '', null, array('size' => 3, 'maxlength' => 3)); $exchange= &HTML_QuickForm::createElement('text', '', null, array('size' => 3, 'maxlength' => 3)); $last4= &HTML_QuickForm::createElement('text', '', null, array('size' => 4, 'maxlength' => 4)); $form->addGroup(array($areacode, $exchange, $last4), 'Phone', 'Phone:', '-'); I've also tried this with the same result. It just says Array in the DB field. Code: [Select] $phone[] = &HTML_QuickForm::createElement('text','areacode',nu ll,array('size' => 3, 'maxlength' => 3)); $phone[] = &HTML_QuickForm::createElement('text','exchange',nu ll,array('size' => 3, 'maxlength' => 3)); $phone[] = &HTML_QuickForm::createElement('text','last4',null, array('size' => 4, 'maxlength' => 4)); $form->addGroup($phone,'Phone','Phone: ','-'); I'd appreciated if someone with QuickForm knowledge would help me out. I need it to not just say Array in the DB, It needs to input what the user typed in. Thanks. |
|
#2
|
|||
|
|||
|
QuickForm returns the values of groups in an array, with each field values being an value in the array. Simply concat the array values properly and you'll get what you want.
error_reporting(E_ALL); is your friend.;-) |
|
#3
|
|||
|
|||
|
Thanks weisemann. Your suggestion works!!
Last edited by tqla : May 10th, 2009 at 03:21 PM. |
|
#4
|
|||
|
|||
|
sry for the double post.
Last edited by tqla : May 10th, 2009 at 03:22 PM. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > QuickForm - Help with addGroup |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|