I find myself a little stumped on this one, maybe some can offer some
insight.

I need a "donate" form that will be sent via SSL to our merchant
processing facility. I need a set of radio buttons that have a
suggested donation amount (accomplished using form->radio('Amount',
array('1000.00' =>'$1000', '500.00' => '$500', '250.00' => '$250',
'100.00' => '$100', '54.00' => '$54', '36.00' => '$36'), null, array
());)

But I also need a text input for other amount.

So how do I validate that either a radio was selected, or an correctly
formatted (10.00) amount is entered in other amount?

I currently have :

'Amount' => array(
                'notEmpty' => array(
                        'rule' => 'notEmpty',
                        'message' => 'Please select a donation amount.')
         ),

        'Other' => array(
                'decimal' => array(
                        'rule' => array('decimal', 2),
                        'message' => 'Please include a full amount with cents.')
         ),

or do I decide what to send to validate prior to sending it in my
controller?

Hope that makes sense.

Thanks for any help!!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to