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

TOPIC:

Bug labelKey in ckxref? 04 Sep 2015 14:52 #13432

Hi admin,

I think there is a bug in the ckxref.php field.

When forking and creating a labelField different from "text", the label is not shown.
The code in ckxref.php looks like:
	public function getInput()
	{

		$this->input = JDom::_('html.form.input.select', array_merge(array(
				'dataKey' => $this->getOption('name'),
				'domClass' => $this->getOption('class'),
				'domId' => $this->id,
				'domName' => $this->name,
				'dataValue' => $this->value,
				'multiple' => true,
				'responsive' => $this->getOption('responsive'),
				'size' => $this->getOption('size', 4, 'int'),
				'valueKey' => $this->getOption('valueKey')
			), $this->jdomOptions));

		return parent::getInput();
	}

When adding 'labelKey' => $this->getOption('labelKey') it works as expected:
	public function getInput()
	{

		$this->input = JDom::_('html.form.input.select', array_merge(array(
				'dataKey' => $this->getOption('name'),
				'domClass' => $this->getOption('class'),
				'domId' => $this->id,
				'domName' => $this->name,
				'dataValue' => $this->value,
				'multiple' => true,
				'responsive' => $this->getOption('responsive'),
				'size' => $this->getOption('size', 4, 'int'),
				'valueKey' => $this->getOption('valueKey'),
				'labelKey' => $this->getOption('labelKey')
			), $this->jdomOptions));

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

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

Bug labelKey in ckxref? 04 Sep 2015 16:45 #13433

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Thank you for the catch.

I will fix that soon.
Coding is now a piece of cake

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

Bug labelKey in ckxref? 09 Sep 2015 12:02 #13450

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.
Coding is now a piece of cake
The following user(s) said Thank You: Romkabouter

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

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

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started