Jump to content

Acknowledgement email to a concatenated field


Recommended Posts

Hi everyone,

 

I am trying to send acknowledgement emails to an address that concatenates two fields. One of these fields is dependent on the form, the other is static 

 

e.g. I have one field: Phone number: 123456789

and I would like the email to be sent to 12345679@xxx.com (where the xxx.com is static for each form).

 

I'm a rookie caspio user and don't know javascript - but it seems like there would be a way to concatenate those two fields to create a new field which can be used to send acknowledgement emails to.

 

Any help would be very appreciated! Cheers!

Link to post
Share on other sites

Hi, welcome to forum.

I suppose you use a submission form. I have modified script from this solution: 

http://forums.caspio.com/index.php?/topic/3200-js-concatenatecombine-two-fields-into-one-field/

 

Try using the following script:

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var position1 = document.getElementById("InsertRecordField1").value;

var allpositions = position1 + "@XXX.com";

document.getElementById("InsertRecordField2").value = allpositions;

}

document.getElementById("caspioform").onsubmit=concatenate;
</SCRIPT>

Replace Field1 with name of the field where you store phone number. Also, replace Field2 with name of the field where you would like to store concatenated value. Please note, you should select the same field for the "Email field" in acknowledgment email. 

 

Hope it helps :)

Link to post
Share on other sites
  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...