Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Cant change text field size.

Cant change text field size. 15 Jan 2014 10:02 #11987

  • cefnllys
  • cefnllys's Avatar
  • Offline
  • Premium Member
  • Posts: 102
  • Thank you received: 5
  • Karma: 1
I have tried as many ways as i can possibly think off to change the size of text fields but nothing seems to work. setting the size in the xml form set-up does nothing even going in and editing the jdom for that field type and specifically defining it to be 10px does nothing. Can anyone Help?

I guess its a css override but i can't see where its coming from.

Cheers
The administrator has disabled public write access.

Cant change text field size. 15 Jan 2014 16:45 #11998

  • neoneper
  • neoneper's Avatar
  • Offline
  • Junior Member
  • Posts: 35
  • Thank you received: 2
  • Karma: 0
you can create style classes to their fields!
Whenever you create an element in your form,it acquired the ID Class (jform_) + the name that you set out on table. Sample:
id = "jform_adress"
id = "jform_city"
....

Now you can create the style for ids.
Sample:
#jform_adress
{
widht: 50px!important;
}


You can also take a espesífico class name for your forms through of the Online Generator. This way you can create a generic style classes for all elements of this form
Last Edit: 15 Jan 2014 16:47 by neoneper.
The administrator has disabled public write access.
The following user(s) said Thank You: admin

Cant change text field size. 15 Jan 2014 19:55 #12000

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
It is a Bootstrap problem.

When it uses such classes : spanX, of input-xxxxx (ex: input-medium), then the with is dynamic and respect a grid.

Solution :
Remove those css classes, and then JDom param will be effective.

EDIT : The solution of neoneper is OK also.
it is using '!important' word, so be carefull with browser compatibilities.

Note that !important should only be used in particular cases.
So the best is to use my solution, I think. But still, I say, two solutions should work.
Coding is now a piece of cake
Last Edit: 15 Jan 2014 19:58 by admin.
The administrator has disabled public write access.

Cant change text field size. 26 Feb 2014 09:10 #12252

  • mtifinn
  • mtifinn's Avatar
  • Offline
  • Junior Member
  • Posts: 20
  • Thank you received: 2
  • Karma: 0
I have the same problem, and I understand how to create a whole new set of CSS for my forms.

But I can see that this is not just CSS, the html has cols and rows set which are not the setting I have saved in J-Cook.
<textarea id="jform_name" name="jform[name]" cols="32" rows="4"></textarea>

I am looking for a solution so that I don't have to go and edit every form in every view each time i update my component.

I did not understand the method described by admin
Remove those css classes, and then JDom param will be effective.

Which CSS classes?
The administrator has disabled public write access.
Time to create page: 0.090 seconds

Get Started