Jump to content

uph printshop

Registered Users - Approved
  • Posts

    6
  • Joined

Posts posted by uph printshop

  1. That worked great, but i also need some text replaced in the return line. The code below is what I had before I added the If statement. They all worked, I just need to incorporate the ReplaceSubstrings into the If statement.

     

    var a = Field("custom text");

    a = ReplaceSubstring(a, "=" , "<br />");

    a = ReplaceSubstring(a, "&" , "&");

    a = ReplaceSubstring(a, "\\" , "|");

    return a;

     

     

    The code I have now is below. I could figure out how to incorporate one replacesubstring at a time.

     

    var a = Field("custom text")

    var b = "Custom Message Here";

     

    if (Field("message type") == "custom")

    return ReplaceSubstring(a, "=", "<br />");

     

    else if (Field("message type") == "default")

    return ReplaceSubstring(b, "=", "<br />");

     

    Thanks so much for your help with this!:)

  2. I am developing a thank you card where you can select a default message or enter your own custom message that appears on the inside of the card. The way I have it set up now, is I have a field named "message type" that is intended to be a drop-down menu with "default" and "custom" selections, and then I have a field named "custom message" where if "custom" is selected, you can type in your message. If default is selected, I want a generic thank you message to appear. Basically I want the coding to say if "default" is selected, return "default thank you message". If "custom" is selected, return the contents of the "custom message" field. Im just not sure how to set up the coding for this.:confused: Thank you!
×
×
  • Create New...