Forums

Fine Tuning of the email

maehooge 26 Feb, 2014
Hi,

I have the following question.

I have a form with a dropdown menu. here is the code:
EM1 = Monday
EM2 = Tuesday
EM3 = Wednesday
....

When storing the data in the database it is stored as EM1. But I want that ChronoForms stored Monday in the database.

What would be an appropriate solution?

Thank you for your response.
GreyHead 26 Feb, 2014
HI Maehooge,

Please see this FAQ for CFv4, I think it will also work with CFv5.
maehooge 26 Feb, 2014
Answer
<?php
$recipient = JRequest::getString('recipients', 'em1', 'post');
$db = array (
  'em1' => 'Maandag',
  'em2' => 'Dinsdag',
  'em3' => 'Woensdag',
  'em4' => 'Donderdag',
  'em5' => 'Vrijdag',
  'em6' => 'Zaterdag',
  'em7' => 'Zondag',
);
$form->data['recipients'] = $db[$recipient];
?>


Sollition🙂 thx
This topic is locked and no more replies can be posted.