Label for

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
tpataki
Profound User
Posts: 24
Joined: Thu Jul 24, 2014 6:52 am
First Name: Thomas
Last Name: Pataki
Company Name: Televis GmbH
Address 1: Hainburger Straße 33
City: Wien
Zip / Postal Code: 1030
Country: Austria
Contact:

Label for

Post by tpataki »

Hi all,
Does anyone have experience with the <label for> in conjunction with input fields.
Unfortunately, no further information in the online help are included.
My Profoundui version is 5.6.0
Thanks in advance
Tom
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Label for

Post by Glenn »

Tom,

The 'label for' property is used on a dynamic output field (or label) widget to generate a <label for> wrapper around itself that points to the specified input element. See screenshot below for a simple example.
forum.png
forum.png (12.57 KiB) Viewed 420 times
forum1.png
forum1.png (41.32 KiB) Viewed 420 times
The idea is that you would 'connect' the output field to the textbox. Does that answer your question?

Glenn
tpataki
Profound User
Posts: 24
Joined: Thu Jul 24, 2014 6:52 am
First Name: Thomas
Last Name: Pataki
Company Name: Televis GmbH
Address 1: Hainburger Straße 33
City: Wien
Zip / Postal Code: 1030
Country: Austria
Contact:

Re: Label for

Post by tpataki »

Thanks Glen,
my question is answered.

Would it also possible to create the following example?
The purpose ist to display a readonly text within a textarea

<Div id = "group">
<Label for = "field"> read only text </ label>
<Textarea name = "field" id = "field"> custom input text</ textarea>
</ Div>
User avatar
matt.denninghoff
Profound Logic Staff Member
Posts: 115
Joined: Wed Feb 10, 2016 3:53 pm
First Name: Matthew
Last Name: Denninghoff
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Label for

Post by matt.denninghoff »

The process for a textarea is the same as with an input field: specify the textarea's ID in the label's "label for" property.

For example, if your textarea had the ID, "TextArea1", then your label's "label for" property would be this value: TextArea1. Then HTML like this would be produced:

Code: Select all

<textarea id="TextArea1"></textarea>
<div id="Label1">
  <label for="TextArea1">This is a text area:</label>
</div>
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests