Results 1 to 6 of 6

I'm piecing together an application that is basically a page with some UI fields. Once ... Software & Theme Development forum

  1. #1
    dozuki's Avatar
    dozuki no está en línea Stack level 1
    Join Date
    Mar 2006
    PIN/ID
    300D7ED6
    Posts
    6

    How to e-mail form data?????

    Advertisement



    I'm piecing together an application that is basically a page with some UI fields. Once the fields are completed the user can save the data and also e-mail the data.

    How do you append the contents of two or three fields so that they are added to the e-mail message body? I can easily get one field to display in the message body through the setContent(msgField.getText()) method, and the API reference guide says that method can use strings, but I can't seem to get the end result.

    I've had some success using a StringBuffer.append bit of code, but the data is displayed as one long line with no formatting.

    Anyone have any experience with this? Thanks.

  2. #2
    cp6169's Avatar
    cp6169 no está en línea Device Pro
    Join Date
    Mar 2006
    PIN/ID
    3056468b
    Posts
    14,661

    Re: How to e-mail form data?????

    Not my area, sorry. Hopefully some of the other stackers have some input for ya.

  3. #3
    millimetre's Avatar
    millimetre no está en línea Stack level 1
    Join Date
    Nov 2006
    Posts
    2
    Hi Dozuki,

    I am not familiar with BB Programming and there may be a better answer but you could use 5 strings instead of 3 and build your formatting inside the 2 additional strings. As in msgField(1),strFormat(1),msgField(2),strFormat(2), msgField(3).

    MM


    Quote Originally Posted by dozuki
    I'm piecing together an application that is basically a page with some UI fields. Once the fields are completed the user can save the data and also e-mail the data.

    How do you append the contents of two or three fields so that they are added to the e-mail message body? I can easily get one field to display in the message body through the setContent(msgField.getText()) method, and the API reference guide says that method can use strings, but I can't seem to get the end result.

    I've had some success using a StringBuffer.append bit of code, but the data is displayed as one long line with no formatting.

    Anyone have any experience with this? Thanks.

  4. #4
    Rcbjr's Avatar
    Rcbjr no está en línea Stack Pro
    Join Date
    May 2006
    PIN/ID
    PM - Ask
    Posts
    14,848
    millimetre, Welcome to PinStack.

    Thanks for the input. It's good to see new members piping in with suggestions like this.

    Rcbjr
    You Ask, We Will Answer
    Can’t Install theme via DM?No Additional Apps Found for Your Device
    Links to Usefull KB Articles

  5. #5
    Rcbjr's Avatar
    Rcbjr no está en línea Stack Pro
    Join Date
    May 2006
    PIN/ID
    PM - Ask
    Posts
    14,848
    Quote Originally Posted by dozuki
    I've had some success using a StringBuffer.append bit of code, but the data is displayed as one long line with no formatting.
    As with millimetre, I don't have experience with BB programming either , but can you append a set of separater characters between each field, Set up a string variable with something like " - " and append this variable after each field is appended? Or you could try using AscII control characters such as
    Code:
    < return > or < linefeed >
    in the variable to format it the way you want it to appear in the email. I use the latter to format progamatic output from Access when needed.

    Just a thought.
    Rcbjr.
    Last edited by Rcbjr; 11-25-2006 at 01:22 PM. Reason: clarify and add
    You Ask, We Will Answer
    Can’t Install theme via DM?No Additional Apps Found for Your Device
    Links to Usefull KB Articles

  6. #6
    dozuki's Avatar
    dozuki no está en línea Stack level 1
    Join Date
    Mar 2006
    PIN/ID
    300D7ED6
    Posts
    6

    Re: How to e-mail form data?????

    Thanks, I couldn't do the append but was able to solve my own problem with the simple "\n" new line character.

    Thanks for the input y'all.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •