Skip to Content
avatar image
Former Member

e-mail button - dynamic e-mail address

Hi to all,

I want to use the "Send vai e-mail" button on an interactive form.

Is there a way to modify the e-mail address dynamically to reference something from the data view?

Thanks a lot,

Antonio

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 20, 2007 at 10:33 AM

    I solved by myself

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Antony,

      I used JavaScript. I bound dynamically email address in a text field on the interactive form, then I wrote the script below in the Validate Event

      var address = new RegExp(); address.compile("^[a-z0-9_
      -
      .]+
      @[a-z0-9_
      -
      .]+
      .[a-z]{2,3}$","i"); var result = address.test(this.rawValue); if (result == true){ true; } else { false; }

      Then in the Click Event of the email button I wrote

      this.resolveNode("#event").submit.target = "mailto:" + TextField.rawValue + "?subject=email subject&body=email body text.";

      I works well.

      Antonio