Text box

Phoca Cart - complex e-commerce extension
User avatar
jrjr
Phoca Professional
Phoca Professional
Posts: 114
Joined: 30 Nov 2018, 23:56

Text box

Post by jrjr »

I want to add a text box to my product attributes. When created it is one single line of text. I do see how to increase the height of the box but doing so only creates unusable white space above and below the text while the text remains on one line. hitting enter does not create a new line. How can I style the box to have multiple lines and be a larger size?

Tags:
christine
Phoca Hero
Phoca Hero
Posts: 2818
Joined: 28 Nov 2010, 17:20

Re: Text box

Post by christine »

Hi jrjr,

Could we see this please?

Kind regards
Christine
User avatar
jrjr
Phoca Professional
Phoca Professional
Posts: 114
Joined: 30 Nov 2018, 23:56

Re: Text box

Post by jrjr »

Sure
This is my test site and I have only added the text box to one item for testing purposes -
http://site2.lakeshoreleather.com/our-p ... wb-holster

I have changed height:41 in Chrome/inspect to get the results I described but even at stock setting (41) it is only one line.
This seems to be Joomla! css and seems like it should be <textarea> instead of <text>

Code: Select all

input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
    height: 41px;
}
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text box

Post by Jan »

Hi, if you want to have text box with more lines, you need to use textarea which then you can style with height and width - mostly it is better to user some relative height and width like percentage.

so html:

Code: Select all

<textarea class="myTextarea">...</textarea>
and css:

Code: Select all

.myTextarea {
 height: 5em;
 width: 15em;
}
Jan
If you find Phoca extensions useful, please support the project
User avatar
jrjr
Phoca Professional
Phoca Professional
Posts: 114
Joined: 30 Nov 2018, 23:56

Re: Text box

Post by jrjr »

I kind of thought so. Is it possible to add this feature to the product attribute?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text box

Post by Jan »

Hi, do you mean to extend the attribute types to textarea?

Image

Jan
If you find Phoca extensions useful, please support the project
User avatar
jrjr
Phoca Professional
Phoca Professional
Posts: 114
Joined: 30 Nov 2018, 23:56

Re: Text box

Post by jrjr »

Yes exactly. Add -
Text area
below
Text (256)
As a selectable option.
Actually I think you could just replace the Text (256) with text area. Wouldn't it be extremely difficult to use 256 characters in a box that you can't see what you are writing because most of it is hidden from view? It would be for me.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text box

Post by Jan »

Hi, I will take a look at it.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Text box

Post by Jan »

Hi, textarea added to 3.1.8:

viewtopic.php?f=44&t=59621&p=155051#p155078

Jan
If you find Phoca extensions useful, please support the project
User avatar
jrjr
Phoca Professional
Phoca Professional
Posts: 114
Joined: 30 Nov 2018, 23:56

Re: Text box

Post by jrjr »

Excellent! Thank you
Post Reply