Forums de discussion

How to have a bigger input field?

Mr Jimmy, modifié il y a 9 années.

How to have a bigger input field?

New Member Publications: 24 Date d'inscription: 07/04/14 Publications récentes
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, modifié il y a 9 années.

RE: How to have a bigger input field?

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
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, modifié il y a 9 années.

RE: How to have a bigger input field?

New Member Publications: 24 Date d'inscription: 07/04/14 Publications récentes
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, modifié il y a 9 années.

RE: How to have a bigger input field?

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
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, modifié il y a 9 années.

RE: How to have a bigger input field?

New Member Publications: 24 Date d'inscription: 07/04/14 Publications récentes
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, modifié il y a 9 années.

RE: How to have a bigger input field?

New Member Publications: 18 Date d'inscription: 01/08/14 Publications récentes
So Jerome, what you only did was removing all but the type ??