Expand my Community achievements bar.

SOLVED

Using form field information for email address in mailto function

Avatar

Former Community Member

Hello

I have encountered a problem for which I don't seem to be able to find an answer, even after multiple hours spent browsing the web:

Basically, I have created a form that I want to distribute to my clients who are supposed to use it for their clients. This is to ensure that all processes are standardised.

My client will fill in one part of the form with their contact details, including their contact email address in a separate field. The end user (client of my client) will fill in the rest of the form. After completing the form, the end user is then meant to click on a button that will submit the whole pdf form via email.

I know how to set a recipient email address using the mailto: function; however, as I have multiple clients that the form will be distributed to in the first place, I cannot pre-determine the target of the mailto: command. Hence I was wondering if it is possible to set the target of the mailto: function to use the information that my client has entered in the contact email address field so that, once that particular form field is populated, the email address is imported into the functionality of the button, and thus ensuring that the submit button is appropriately individualised.

I would have thought it is possible, as it is possible, for example, to use part of the form to appear as the body text of an email, but since I am still very much a beginner/amateur regarding all things javascript/php, I have no idea what the script should be like.

Any thoughts and all help would be greatly appreciated.

Kind regards and many thanks.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Yes #3 is the right one .....the real email option contains the property that has the email address specified in it....so the fake email button allows you to modify this property before sending it. In your case instead of referencing the DDlsi field you woudl reference your field that holds the email address.

Make sense?

If you are not used to code it can look daunting ...if you want to send your form to LiveCycle8@gmail.com I can code it up for you so you can see it in your context.

Paul

View solution in original post

4 Replies

Avatar

Former Community Member

Yes it is possible ....I created a form to describe the different things that are possible (see attachment).

Paul

Avatar

Former Community Member

Hello Paul

Thank you very much for your quick reply.

I have to admit, however, that I am not quite confident I understand your form correctly.

First up, I believe the example on your form that applies to my situation is number 3 (the one with the fake submit button), where the email address that the form is mailed to is selected from the drop down list. In my case, however, it would be a straight forward text box that would contain the email address. How, then, do I make it so that the submit button (regardless if it is fake or real) picks up that email addres?

Looking at the example, nothing seems to happen, and the email address on the hidden submit button remains the example that you provided.

Sorry, this is probably completely wasting your time but I do appreciate if you could simplify the steps for me even further (if possible.

Kind regards and many thanks.

Avatar

Correct answer by
Former Community Member

Yes #3 is the right one .....the real email option contains the property that has the email address specified in it....so the fake email button allows you to modify this property before sending it. In your case instead of referencing the DDlsi field you woudl reference your field that holds the email address.

Make sense?

If you are not used to code it can look daunting ...if you want to send your form to LiveCycle8@gmail.com I can code it up for you so you can see it in your context.

Paul

Avatar

Former Community Member

Hi Paul

Thank you so much for all your help. The form you sent me does exactly what I need it to do.

Fantastic job!

Have a great weekend.

Kind regards and, once again, many thanks.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----