- This topic has 3 replies, 3 voices, and was last updated 11 years, 9 months ago by mreade.
-
AuthorPosts
-
mreadeMemberSee attachment Support_Send_Email_Question_Screen_mreade.pngGood Morning Support,
I have been experimenting with the “Send Email” feature to email field results from an app form. I would like to include a text result from the form in the body of an emal message which is sent by selecting a button on the form. (I’ve included a screen with this message.)
When setting up the form “Email” action email message, there is an ability to insert variables from a dropdown list. These variables appear to be from the text fields created on each specific screen. However, when i first tried this feature, my answers on the provided attachment were originally created as a simply “text” line that would change once the calculation button was selected. But, when i used the “text” line, it did not show up on the “insert var” list so i could include it in the email body.
The only way that I could get the answers to show up on the “insert var” list was to change the “text” line to a “text area” and set the property to “read only.” I would much prefer to use a “text” line to show the answers.
My Question is:
Is there any way to use a “text” line and have it show up as a variable on the “insert var” list?
If I created a variable within the frmMain_custom.js file, would it then show up on the “insert var” list so I could select it when designed the email message’s body?
Thanks in advance
mreade
Attachments:
You must be logged in to view attached files.
WaylandDavisMemberHere’s a test I made to solve a similar problem.
Attachments:
You must be logged in to view attached files.
support-michaelKeymasterThe SendEmail action is very new and provides basic support for defining a static text msg body and then inserting the values of traditionally http form widget values. As you have discovered the text widget is not a form widget and has no direct user provided value. Thus it and all other non-input widgets are not identified by the SendMail editor as parameters to include in the msg body.
My Hack – simulate a hidden inputField to hold whatever text you wish to include!!!
Another approach is to add an inputField widget, set it to read-only, disable its border, set its background and foreground colors to be transparent, set it size as small as possible such as 5×5 and position in some remote area of the UI. Before the user submits the form copy whatever text you want to send into this obscure inputField. See the example below with a project src code. See attachment sendmail-include-text.zip See attachment simulate-hidden-input.png/** * Called when document is loaded. */ phoneui.documentReadyHandler = function() { $('[id$=hiddenField]').val( $('[id$=text2Email]').text() ); }
See attachment simulate-hidden-input-email-sendemaileditor.png See attachment simulate-hidden-input-email.png
Attachments:
You must be logged in to view attached files.
mreadeMemberMany thanks Wayne for the prompt reply.
As usual, you guys are doing a fantastic job with MobiOne and I can only imagine that the demand for this and support will increase more and more as time passes.
Best regards,
mreade
-
AuthorPosts