Hi, I want to set and populate a drop-down option field in my form, actually I want the user to chose what department to contact by choosing from the drop-down menu and I want by choosing it the selected department that user e mail to be sent on the exact e mail of the chosen department, I tried to find solution but I could not find, please help me.
Forums
How to set drop-down field in my form
Hi Bob, I did everything as it is explained in your post link, but I have a problem.
I can see all the emails I entered in the custom element in the preview but I do not see them in the actual form on the website, there on the website drop-down box is empty,why?
what mistake I have done?
<!-- w --><a class="postlink" href="http://www.leaderwriter.com">www.leaderwriter.com</a><!-- w --> is my website link and if you click the Contact Us top menu item you will see the actual form.
This is what I use in the check box in options in the preview ( there I can see all the mails I entered and I can choose from).:
em1=adve
em2=bill
em3=cust
em4=techn
em5=acc
em6=art
em7=ebooks
These are shorts of my fully entered e mails.
In the events On Submit I use as you recommended me Custom Code action with the following code:
?php
$recipient = JRequest : :getString ('recipients', 'em1', 'post');
$emails = array (
'em1' => [email]'advertising@leaderwriter.com[/email]',
'em2' => [email]'billing@leaderwriter.com[/email]',
'em3' => [email]'customersupport@leaderwriter.com[/email]',
'em4' => [email]'technicalsupport@leaderwriter.com[/email]',
'em5' => [email]'accounts@leaderwriter.com[/email]',
'em6' => [email]'articles@leaderwriter.com[/email]',
'em7' => [email]'ebooks@leaderwriter.com[/email]',
};
$form->data['email_to_use'] = $emails[$recipient];
?>
What is wrong with this Bob, I think I done everything you told me in the link?
I can see all the emails I entered in the custom element in the preview but I do not see them in the actual form on the website, there on the website drop-down box is empty,why?
what mistake I have done?
<!-- w --><a class="postlink" href="http://www.leaderwriter.com">www.leaderwriter.com</a><!-- w --> is my website link and if you click the Contact Us top menu item you will see the actual form.
This is what I use in the check box in options in the preview ( there I can see all the mails I entered and I can choose from).:
em1=adve
em2=bill
em3=cust
em4=techn
em5=acc
em6=art
em7=ebooks
These are shorts of my fully entered e mails.
In the events On Submit I use as you recommended me Custom Code action with the following code:
?php
$recipient = JRequest : :getString ('recipients', 'em1', 'post');
$emails = array (
'em1' => [email]'advertising@leaderwriter.com[/email]',
'em2' => [email]'billing@leaderwriter.com[/email]',
'em3' => [email]'customersupport@leaderwriter.com[/email]',
'em4' => [email]'technicalsupport@leaderwriter.com[/email]',
'em5' => [email]'accounts@leaderwriter.com[/email]',
'em6' => [email]'articles@leaderwriter.com[/email]',
'em7' => [email]'ebooks@leaderwriter.com[/email]',
};
$form->data['email_to_use'] = $emails[$recipient];
?>
What is wrong with this Bob, I think I done everything you told me in the link?
that is my point Bob, I did everything by your link about setting drop-down box field,
there is a drop-down field but it is empty, I really do not know how to fix it,here is the link of the form : http://www.leaderwriter.com/index.php/contact-us
can you help me?
there is a drop-down field but it is empty, I really do not know how to fix it,here is the link of the form : http://www.leaderwriter.com/index.php/contact-us
can you help me?
Here is what I see in the Preview , I see the drop-down field with all emails in it and I can choose any email I want, but when I publish it, there is nothing in the drop-down field in my form.
I sent and attachment from my Preview you may notice there is drop-down field with all emails i entered in but it does not show in the published form.
I apologise for the bad quality of the attachment.
Please , give me some help to fix this problem.
Here is the link of the form : http://www.leaderwriter.com/index.php/contact-us
I sent and attachment from my Preview you may notice there is drop-down field with all emails i entered in but it does not show in the published form.
I apologise for the bad quality of the attachment.
Please , give me some help to fix this problem.
Here is the link of the form : http://www.leaderwriter.com/index.php/contact-us
Hi dleltd,
Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.
Bob
Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.
Bob
Ok Bob, I made a back up form and it is attached here, take a look and please tell me what I am doing wrong.
Bob I still wait for your help, what I did wrong with the form.
Bob I still wait for your help, what I did wrong with the form.
Hi dleltd ,
You have enabled the Dynamic Data option in the Dynamic Data tab of the Select drop-down element. When you do this ChronoForms ignores the entries in the Options box as it expects to get the options from the Dynamic Data - but there is none specified here.
Disable this option and the emails will display.
Bob
You have enabled the Dynamic Data option in the Dynamic Data tab of the Select drop-down element. When you do this ChronoForms ignores the entries in the Options box as it expects to get the options from the Dynamic Data - but there is none specified here.
Disable this option and the emails will display.
Bob
This topic is locked and no more replies can be posted.