facebook

submit form

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #344721 Reply

    Hi

    I have downloded a template with a submit form, how do I make this funktional in my app?
    I have tryed to put an e-mail adress on the submit button, but it only redirect to send an e-mail with no atachement.

    Please advice, because this would be great to use.

    Regards

    #344728

    nvts
    Member

    Ryan,

    Here is a function to send an email. This was submitted from another user on this forum and I had it in my code snippets for use later. I have not tested it, but hope this helps.

    function sendyourformnameMail(){
      
      //Declare variables
      var variable1, variable2, variable3;
      var variable4, variable5, variable6;
      var msg, url, LF;
      
      //Link variables to fields
      LF = "%0D%0A";
      variable1 = ($('#m1-yourformname-arg1Field').val());
      variable2 = ($('#m1-yourformname-arg2Field').val());
      variable3 = ($('#m1-yourformname-arg3Field').val());
      variable4 = ($('#m1-yourformname-totalField1').text());
      variable5 = ($('#m1-yourformname-totalField2').text());
      variable6 = ($('#m1-yourformname-totalField3').text());
      
      //Format message for email body
      msg = ("Descriptive Text in Body of Your Message:" + LF +
           LF +
           "Some Text = " + variable1 + LF + 
           "Some Text = " + variable2 + LF +
           "Some Text = " + variable3 + LF +
           LF +
          "Some More Text:" + LF +
           LF +
           "Some Text = " + variable4 + LF +
           "Some Text = " + variable5 + LF +
           "Some Text = " + variable6);
    
      url = "mailto:" + "?subject=The Subject Name of Your Message&body=" + msg;
    
      //Open mail client and insert body of email
      window.location.href = url;
      }
      

    Cheers…

    #344729

    Hi
    Sorry but no, I entered my e-mail adress in the code mail to, but i does not work.

    I put the code in the JavaScript funktion.

    Thankful if you got an answer.

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: submit form

You must be logged in to post in the forum log in