Hello all,
I have created a successful payment form but I would like to offer our customers the option to save their credit card info via a checkbox. So does anyone know how to create a conditional DB Save operation they would be willing to share? I'm running Joomla 1.5 and CF V4 RC1.9 Thanks!
Hi gabedaly,
A bit of a worksround but I think that you could do it by using a Model ID for the DB Save and then having a Custom Code box add or remove data from the Model ID array.
This doesn't make the DB Save conditional but it does make the data saved conditional.
Bob
That sounds like it work good. At the least, we will always save the address and other info for future payments. When you have time Bob, could you please give us an example code to put in the custom code box? Obviously the save would have to depend on the user selecting a checkbox. Boy I wish I had the time and brain power to learn coding! There is so much that can be done with this extension if I only knew how.
Hi Gabe,
With a custom server side validtaion code box:
if(!isset($form->data['check_box_name_here'])){
return false;
}
then in the "on Success" event of the validtaion box you should add your DB Save action
Regards,
Max
Note, for V4RC2.0 users the code above should work fine if the "ghost" is not enabled for the chekcbox, other wise you will need to check the checkbox value.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thank you Max. Works perfect.