I'm having an issue with the admin generator + partial + validation. I
can't seem to get this running. I've search the forums to no avail, perhaps
I'm just using the wrong search terms.
I have a form, which requires both an area code, and telephone number.
(555) 555-5555 ext 123, to be on one line. Where the area code, is an
numeric field, and the remainder a string field.
I have the partial showing up... but I have two issues:
1.) the validation fails
2.) the saving fails, even if I take out the validation.
Any assistance is greatly appreciated.
#edit.yml
methods:
post:
- "supplier{tel_areacode}"
- "supplier{tel_number}"
fields:
supplier{tel_areacode}:
required:
msg: Your area code is required
sfNumberValidator:
nan_error: Please enter a valid areacode
#generator.yml
generator:
class: sfDoctrineAdminGenerator
param:
model_class: Supplier
theme: default
edit:
title: Editing Supplier "%%company%%"
display:
"Company Info": [company, contact, _phonenumber]
"Notes": [notes]
fields:
notes: {params: rich=true tinymce_options=height:150,width:600}
<?php
// the partial "_phonenumber.php"
$value = object_input_tag($supplier, array ( 0 => 'get', 1 => array
( 0 => 'tel_areacode', ),), array ( 'size' => 25, 'control_name' =>
'supplier[tel_areacode]',));
echo $value ? $value : ' ';
$value = object_input_tag($supplier, array ( 0 => 'get', 1 => array
( 0 => 'tel_number', ),), array ( 'size' => 25, 'control_name' =>
'supplier[tel_number]',));
echo $value ? $value : ' ';
?>
--
--
Lloyd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---