Expand my Community achievements bar.

SOLVED

Text that grow with growable text field

Avatar

Level 1

I have created a form using Livecycle Designer. I have 2 issues;-

1. How to create growable text field.

2. There is some text before and after the growable text field, how to make the texts after the growable text field "grow" as the growable text field grow. (when the user starts filling the field the text after the text fiend will grow rightwards as the text field expand.)

3.How to create duplicate text field that will capture/reflect whatever user type in one text field into another text field without actually filling up twice.

See attached file

Will be appreciate if anyone can help! thanks thanks =)

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

For Q1 and 2 there is something called a Floating Field that will allow you to merge data into a text block and reflow it to remove all of the spaces in the block. This is only available when data is merged onto the form. This is not an interactive field. Once the data is merged it is turned into a static text block.

For Q3 it is a case of assigning one value to another.

FieldNameofTargetField.rawValue = OriginalFieldName.rawValue;

This code needs to be executed on an event tied to the Original field. Typically the exit event is used for this purpose. So when the user exits the field, the target field will be updated with what was typed into the original field.

Paul

View solution in original post

14 Replies

Avatar

Former Community Member

1. How to create growable text field.

in the properties, layout tab, check "Expand to fit" (height) and under Object tab, Field tab, select allow Multiple lines

2. There is some text before and after the growable text field, how to make the texts after the growable text field "grow" as the growable text field grow. (when the user starts filling the field the text after the text fiend will grow rightwards as the text field expand.)

put everything into a table, with rows and colums, as the growable text cell grows, all the cells in that row will grow too

3.How to create duplicate text field that will capture/reflect whatever user type in one text field into another text field without actually filling up twice.

on exit of the first text field the following:

secondText.rawValue = this.rawValue

or set the binding to global

Avatar

Correct answer by
Former Community Member

For Q1 and 2 there is something called a Floating Field that will allow you to merge data into a text block and reflow it to remove all of the spaces in the block. This is only available when data is merged onto the form. This is not an interactive field. Once the data is merged it is turned into a static text block.

For Q3 it is a case of assigning one value to another.

FieldNameofTargetField.rawValue = OriginalFieldName.rawValue;

This code needs to be executed on an event tied to the Original field. Typically the exit event is used for this purpose. So when the user exits the field, the target field will be updated with what was typed into the original field.

Paul

Avatar

Level 1

Thanks Paul!!! =)

Another question though....how do you change the properties of the floating field to bind to the data?

Avatar

Former Community Member

Once you place the field on the form ....there is a representation of that object in the hierarchy view. If you click on that then the object palette will become active and you can do your binding on the binding tab.

paul

Avatar

Level 1

Thanks alot Paul!! =)

One more question.

I would like to link one form field to another in such that if I enter certain info into a form field, another info will be presented in another form field directly without having to key in manually. (like vlook up in microsoft excel).

How can I do that?

Thanks =)

Avatar

Former Community Member

I do not know what vlook is in Excel but making two fields hold the same data is not a bug deal. Simply make sure that the fields have the same name and that the binding is set to Global and the copy of the data will happen automagically for you!

paul

Avatar

Level 1

Sorry Paul. Think I was not clear in the last question. Sorry about it! =)

What I meant was for example, I have created 2 drop-lists , one with the husband name and the other with the wife name.

What I want is that when I click on the husband name, the wife name will appear without having to click. Hence, how to link this 2 data together?

THANK YOU

Avatar

Former Community Member

How do the two list correlate? If I pick a husband name how do I know what the wife name is?

Paul

Avatar

Level 1

Paul, that is exactly what I want to do. Should I key in the husband and wife name first in a database? And link them together? But how?

Avatar

Former Community Member

Now I am completely confused.

You said you wanted two DD lists of names ....one for the husband the other for the wife. Are you intending on having a list of names that I can choose from? If thats what you want generally you use a list to limit the input to a finite set of values. If you are asking for a persons name then the list is almost endless. .....so a regular textfield is a better option. If the information about the names is held elsewhere we can have the form communicate with certain data sources to populate those fields "automagically".

Lets start from scratch and if you can describe in detail what you are trying to accomplish I may be able to help. If you have a sample form that does something similar then include that to help with the understanding.

Paul

Avatar

Level 1

Dear Paul,

Sorry for the late reply. OK...I have attached an example.

Let say I know that doctor A is from Clinic A and doctor B from Clinic B etc.

How can I make it such that when I click on doctor A, Clinic A will automatically be "filled" on the clinic text fill?

Do I have to generate a database source? if yes, how should I go about doing it?

Thank you Paul

Avatar

Former Community Member

Here is a modified sample ....the code is on the change event of the Dr dropdown.

Paul

Avatar

Level 1

Thanks paul! it help but...

When I add in doctor d, doctor e, doctor f....it would not work.

Also, if doctor b is also from clinic a..by right it should work using the same code right? But i've tried and it does not seems to work.

please help!!! Thank you thank you

Avatar

Former Community Member

You created syntax errors in the script therefore it would not run. If you have many doctors then a woudl recommend using a different coding technique - a Switch statement). This makes the coding much easier to understand - this is not to say you cannot use if staement but it can get prettty convuluted. The modifed sample shows how to do it using both techniques. Have a look and decide which one works best for you.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----