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.104 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started