You are viewing limited content. For full access, please sign in.

Question

Question

Can't make a multi-line default value in Forms

asked on April 10, 2020

I can fill in a single-line default value in a multi-line field, but I can't figure out how to make a multi-line default value in a multi-line field. I want to be able to basically have a list pre-populating a multi-line field. Is there a way to add support for some kind of character to stand-in for a CR/LF when filling out the default value of a multi-line field (like 
), or do I need to turn to Javascript or jQuery to make a multi-line default value?

0 0

Replies

replied on April 13, 2020 Show version history

Hi Steven,

It looks like you will have to use JavaScript. I don't see any other way to include line breaks in the default field value for a multi-line field.

$(document).ready(function() {
  $("#q1 textarea").val("multi-line\ntest").change();
});
0 0
replied on April 13, 2020

Hi Steven, can you provide a screen shot of what you want this functionality to look like. Trying to understand the use case for your request

0 0
replied on April 13, 2020

Here's a mock-up of what I'd like, courtesy of some quick photo-chopping. Basically, just the ability to make a default value in the multi-line fields that is itself a multi-line value, instead of being limited to a single-line.

Multi-line default.jpg
0 0
replied on April 13, 2020

Is this list that appears in the Multi-line field supposed to be selectable?

If not I would just use a Customer HTML Field to format and display the text

0 0
replied on April 13, 2020

Not particularly a list, just a multi-line default value. Maybe an instruction or hint for filling out a description, or if I wanted to leave an example that consists of multiple lines of text, or if I wanted to pre-fill the field with an outline of the information I'm trying to collect in the multi-line field.

Basically, my gripe is that the input field accepts carriage returns, so why can't the default value field also accept a carriage return? I thought it couldn't hurt to ask for such a feature.

0 0
replied on June 27, 2022

In the cloud I have learned to use the lookup tables as a work around for this. When saving multiline info to the lookup table the carriage return line feed is replaced by < br >. I have created a workflow that will look up the value and replace the < br > with CHAR(13) & CHAR(10), then load the value into the BP variable.

UpdateMultiLineDefault.png
0 0
replied on June 27, 2022 Show version history

I think you're confusing saving and processing multi-line values with my original request; setting a multi-line field's default to a value that contains more than one line. The field for default values doesn't support multi-line values. That's all I need; being able to set a field's default value to something with a carriage return or newline character.

0 0
replied on June 27, 2022

Hmm. Maybe I wasn't as clear as I could be; you don't even need lookup tables, that is just how I discovered this work around.

1.) Use a workflow with a token calculator to set a workflow output parameter to have a multi-line text value.
2.) Use the workflow in a business process to assign the output parameter to a business process multi-line form variable before the form is run.

This will effectively allow you to set a default value with carriage returns, if that is not what you are looking for I apologize. The only caveat is that any process variables that you wish to use in the default value will have to be defined before the workflow runs in the business process. It is currently working for me, I just thought I would share the trick.

UpdateMultiLineDefault.png
0 0
replied on June 27, 2022

I see how you're setting these "default values" by setting them at the same time you're starting the form from a business process, but this won't help set the default values of a "one-and-done" form, or one that's designed to be started via the Forms "Start Process" button. I could probably also write a multi-line default value via URL by setting the text of the multi-line field using "%0D%0A" in the multi-line value to represent LF/CR, but this is still not going to address my request for Forms to let me just define a default value with a multi-line value in the form editor.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.