Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] cktext fields ignore specified size - all are 32 14 Dec 2012 22:58 #6097

Within dom\html\form\input\text.php is this function:
51
function __construct($args)
52 {
53
54 	parent::__construct($args);
55
56 	$this->arg('size'		, 6, $args, '32');
57
58
59 }
When line 56 is executed, this is the value of $args:
0				html.form.input.text
1
	datakey		playlist_title
	dataValue	New Playlist Default Name
	domclass
		0	sips_info validate[required]
	formControl	jform
It appears that there is no size in the provided arguments, in spite of the XML shown below
<field name="playlist_title"
	label="SIPS_FIELD_TITLE"
	labelclass="tooltip"
	description="SIPS_FIELD_TITLE_TOOLTIP"
	alias="playlist_title"
	required="true"
	filter="STRING"
	size="100"
	class="sips_info validate[required]"
	type="cktext"/>
Seems like a bug to me, but until it is fixed in the builder, can you point me to the place to fix it? - I've developed my component too much to rebuild again.

Also, using "text" instead of "cktext", works as expected and I can reproduce this using the Sandbox.

Please Log in or Create an account to join the conversation.

Last edit: by gdpodesta.

Re: cktext fields ignore specified size - all are 32 14 Dec 2012 23:45 #6098

:) Found and patched it by adding size to cktext shown below, and rows/cols to cktextarea:
public function getInput()
{

    $this->input = JDom::_('html.form.input.text', array_merge(array(
        'dataKey' => $this->getOption('name'),
        'dataValue' => $this->value,
        'domClass' => (isset($this->element['class'])?$this->element['class']:null),
        'formControl' => $this->formControl,
        'size' => (isset($this->element['size'])?$this->element['size']:50)
        ), $this->jdomOptions));

    return parent::getInput();
}
The following user(s) said Thank You: admin, JoomGuy

Please Log in or Create an account to join the conversation.

Re: cktext fields ignore specified size - all are 32 15 Dec 2012 08:32 #6101

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Nice1!

K+1

Thanks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: cktext fields ignore specified size - all are 32 15 Dec 2012 13:48 #6107

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed :
$this->input = JDom::_('html.form.input.text', array_merge(array(
		'dataKey' => $this->getOption('name'),
		'domClass' => $this->getOption('class'),
		'formControl' => $this->formControl,
		'size' => $this->getOption('size')
	), $this->jdomOptions));
Coding is now a piece of cake
The following user(s) said Thank You: gdpodesta, JoomGuy

Please Log in or Create an account to join the conversation.

Re: cktext fields ignore specified size - all are 32 15 Dec 2012 14:34 #6117

Does this work as is for cktextarea as well (re rows/cols vs. just size)
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Re: cktext fields ignore specified size - all are 32 15 Dec 2012 15:02 #6120

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
added in cktextarea as well. (rows / cols)
Coding is now a piece of cake
The following user(s) said Thank You: gdpodesta, JoomGuy

Please Log in or Create an account to join the conversation.

Re: [FIXED] cktext fields ignore specified size - all are 32 22 Jan 2013 15:41 #6490

  • LJ01
  • LJ01's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 78
  • Thank you received: 2
Hi
is it possible to add size in calendar.php

LJ
Ce sont les fils qui font les cordes
ingall-niger.org

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.075 seconds

First of all... I have to congratulate you guys for the awesome tool... I came here only to see what this thing was up to and I have to tell that I'm very impressed with what this tool can do. French guys are making a revolution on Joomla... first with Seblod and now Cook...
Griiettner (forum)

Get Started