then accessories to go with those products.
In the accessories-picking page, I was hoping to use one large Ajax
form where users click on radio buttons to choose accessories. The
complicated part is that when a user clicks radio button A versus
radio button B, there are multiple variables related to that one
click.
In the rest of the application I have used $ajax->link with
$options['url'] and a long params['named'] chained in that url. So
with each link click, I grab maybe 15 to 30 parameters, and don't have
to hit another mysql query ... and can use all these parameters in the
design instantly.
The issue I have is that with $form->() or $ajax->form() I can only
chain my variables using the form(), submit(), or link() methods. And
the variables change per radio button, so when I do:
<?php foreach($option as $options): ?>
<?php echo $form->radio('var', $aa_array, array('class' => 'class',
'value' => $values)); ?>
<?php endforeach; ?>
... I don't have the variables I need. To remedy the situation, I've
created several grouped 1 radio button ajax forms with $ajax-
>observeForm() which each includes a chained $options['url'] with
named params.
I don't think this is the most streamlined solution, but it works as a
stop gap.
So CakeGurus ... what's the best way to do this?
I've looked into options['with'] and Prototype Serialize as an
option ... possibly using multiple hidden input tags, but I haven't
tried that. I've also considered just sticking with links and
designing links that look and act like radio buttons using JS.
I've been staring at this code too long ...
Any help would be appreciated.
Joe
--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment