Skip to Content

Force input lable to be above field.

Feb 10 at 11:57 AM


avatar image

I've been trying to find a solution so that I can set the label's position to be above the field or input.

So far all examples have the label to the left of the input, but I would prefer to have an option to have it above the input.

Is there a proper way to do this or simple hack that will cause this, such as putting both elements in a VBOX.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Iftah Peretz
Feb 10 at 12:11 PM

Sure - taken from here

    	<Panel id="containerLayout"
				headerText="Result in a Container"
		<Label id="label"
				text="Above input:"/>
		<Input id="containerInput"></Input>
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks for the link and snip. I think I overlooked it since I assumed it was on the top because the size of the label.

To elaborate on the answer; In order to have a label be on top of an input, wrap them in a panel.

None of the arguments matter, only the panel.

        <Panel id="containerLayout" >
                <Label id="label" text="Above input:"/>
                <Input id="containerInput"></Input>

Following up, it seems that while an input works well with this method, a Text or HTML component doesn't work.
I got OK results by putting a VBOX inside of the panel.