Highlighted

How can I change the submit mailto adress(es) dynamically, based on a dropdown?

Avatar

06-10-2008

How can I change the submit mailto adress(es) dynamically, based on a dropdown?



I need to make a form with an dropdownbox.

The value selected will set the mailto value.

Other textfields have to set the cc value.



How can I do this?

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

07-10-2008

If you post your form to livecycle8@gmail.com I will give it a try.
Highlighted

Avatar

Avatar

Luigi_247_365

Avatar

Luigi_247_365

Luigi_247_365

08-10-2008

Am also looking for this solution... does anybody have this?



====

console.println("rawVal " + xfa.form.xx.LeavePage.btnSubmitToManager.rawValue);

console.println("val " + xfa.form.xx.LeavePage.btnSubmitToManager.value);

console.println("name " + xfa.form.xx.LeavePage.btnSubmitToManager.name);

=====



xfa.form.xx.LeavePage.btnSubmitToManager.value returns an [XFAObject]

how can this be used? looped through it and found nothing?



====



In the XML Source view, we are trying to change the "target" attribute of the element, but still can't find anything that resembels a solution
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

08-10-2008

So I would use a Button object (I called mine Mail) then make it a submit button. In the submit tab set the submit url to be mailto:emailaddress. Now when you want to change it use this javascript code:



app.alert(Mail.event__click.submit.target);

Mail.event__click.submit.target = "mailto:newEmailAddess@company.com";

app.alert(Mail.event__click.submit.target);



Note that the app.alert statements are for debugging only.
Highlighted

Avatar

Avatar

Luigi_247_365

Avatar

Luigi_247_365

Luigi_247_365

09-10-2008

Excellent... wat a legend 🙂

nice one!

thank you!
Highlighted

Avatar

Avatar

Luigi_247_365

Avatar

Luigi_247_365

Luigi_247_365

09-10-2008


Highlighted

Avatar

Avatar

Luigi_247_365

Avatar

Luigi_247_365

Luigi_247_365

14-10-2008

The solution works for one submit button.



When one has a number of submit buttons on the page.. strange results that cannot be explained happen!



Am still digging and will post some concrete results when done.
Highlighted

Avatar

04-11-2008

<a href="http://www.glimmerrocks.com/" <br />title="Engagement Rings" target="_blank">Engagement Rings</a> <br />- Find glittering engagement ring, engagement rings, cheap engagement rings, discount engagement rings, designer engagement rings and customized engagement rings at our certified online jewelry store.
Highlighted

Avatar

Avatar

ibwaheemi

Avatar

ibwaheemi

ibwaheemi

20-11-2008

hi



i am trying to accomplish a similar thing with no results as yet.



i have my button converted to an email submit button. When i make a selection from a dropdown box i would like the dropdown menu value to become the new mailto: address.



the cc value needs to be a combination of two fields and the form title, is that possible?



the form will be used alot and would save a lot of time if they were prepolulated, and i need to send the pdf file as a pdf not an xml.



there is also just one submit button on the form.



this should be a common problem as many forms will need to be sent to different offices depending on the info within the form.



this was the only thread on this topic that i could find



ibrahim
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

21-11-2008

Yes it is possible .....do not use a mailto button ...use a submit button ....you can set the submit url to a mailto url where you can set all parts of the mail message and you can set what is to be submitted to whatever you want. Just do a google search on the net for mailto and you will see how to set the url to what you want.



Now to set the command dynamically you can use this command:



ButtonName.event__click.submit.target