留言板

How to have a bigger input field?

Mr Jimmy,修改在9 年前。

How to have a bigger input field?

New Member 帖子: 24 加入日期: 14-4-7 最近的帖子
Hi, I can't find any informations about a big input field. I wan't to create a simple formular where the customer can write his own text. But the input field is so small. Is it possible to have a greater one, maybe with mulitple rows?
I've got this at the moment:
<aui:input name="productName" size="450" />

It doesn't have any effect if I change the size to 45000 or 45.. I hope you can understand my problem.

Sincerely yours

JC
thumbnail
David H Nebinger,修改在9 年前。

RE: How to have a bigger input field?

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
I think you want a text area, not a single input string.

Width is also going to be controlled by CSS, not by your code.
Mr Jimmy,修改在9 年前。

RE: How to have a bigger input field?

New Member 帖子: 24 加入日期: 14-4-7 最近的帖子
Thank you for the answer.
I changed it to textarea. But I can't find a possibility to get the input out of this field. At the moment I have:
&lt;%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %&gt;

<input type="text" id="some-input">

<aui:script>
YUI().use(
  'aui-form-textarea',
  function(Y) {
    new Y.CharCounter(
      {
        input: '#some-input'
      });
  }
);
</aui:script>


I don't know if this is right. I can't find any informations about 'aui-form-textarea' here.
What do I have to do, if I want to use the text in the textarea?
thumbnail
Kyle Joseph Stiemann,修改在9 年前。

RE: How to have a bigger input field?

Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Hi Mr. Jimmy,
If you still want to take advantage of aui:input while using a textarea, you can use <aui:input type="textarea" ... />. As for getting the input from the textarea, are you talking about getting the input on the server, on the client, or both? The Writing the My Greeting Portlet page explains how to get input values on the server. On the client, you should use A.one(#myInputId).get('value').

- Kyle
Mr Jimmy,修改在9 年前。

RE: How to have a bigger input field?

New Member 帖子: 24 加入日期: 14-4-7 最近的帖子
Thank you both, its working now with this code:

<div id="contentBox">
	<aui:form action="<%=sendCommentMailMethod.toString()%>" method="post">
		<aui:fieldset>
			<aui:input name="mailText" type="textarea" />
			<aui:button-row>
				<aui:button id="closeModal" value="Abbrechen" class="btn"></aui:button>
				<aui:button type="submit" />
			</aui:button-row>
		</aui:fieldset>
	</aui:form>
</div>
Javier Vera,修改在9 年前。

RE: How to have a bigger input field?

New Member 帖子: 18 加入日期: 14-8-1 最近的帖子
So Jerome, what you only did was removing all but the type ??