Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Disable a combobox

[SOLVED] Disable a combobox 01 Jul 2012 08:29 #2723

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
HI Everybody!!!

Another suggestion for me :)

I'd like, in a form, to define a combobox not editable which shows only the current id value passed by a filter_id from a previous form.....

How can I do that?

Should I define something in the JDOM select.php?

I appreciate your interest.......kind regards.
Last Edit: 14 Oct 2012 09:53 by admin.
The administrator has disabled public write access.

[SOLVED] Disable a combobox 01 Jul 2012 10:37 #2724

  • dares
  • dares's Avatar
  • Offline
  • Junior Member
  • Posts: 37
  • Thank you received: 4
  • Karma: 2
After download your component edit file where you placed "select" is and add "disabled" to this select.
73,
Miro

Cook saves your time and make your life easier.
The administrator has disabled public write access.

[SOLVED] Disable a combobox 02 Jul 2012 10:21 #2729

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
'selector' JDom parameter allows you to inject whatever tag values in your input.
JDom::_('html.form.input.select', array(
	...
	'selectors' => array(
		'disabled' => 'disabled'
		...
	)
));


That's all !!
(not tested, but should work)

ps : see also : www.j-cook.pro/forum/9-coding-inside-you...efrom-is-filled#2727
Coding is now a piece of cake
The administrator has disabled public write access.

[SOLVED] Disable a combobox 02 Jul 2012 18:41 #2736

  • tr4ding
  • tr4ding's Avatar
  • Offline
  • Senior Member
  • Posts: 42
  • Karma: 1
admin wrote:
'selector' JDom parameter allows you to inject whatever tag values in your input.
JDom::_('html.form.input.select', array(
	...
	'selectors' => array(
		'disabled' => 'disabled'
		...
	)
));


That's all !!
(not tested, but should work)

ps : see also : www.j-cook.pro/forum/9-coding-inside-you...efrom-is-filled#2727

It works!!! But when I click on save button on that forms, it doesn't store in the db the value proposed in that combobox non editable, indeed it saves a "zero" id reference!
Any clues?
The administrator has disabled public write access.

[SOLVED] Disable a combobox 04 Jul 2012 11:28 #2756

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
use 'readonly' instead of 'disabled'

Sorry for mistake.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.063 seconds

Get Started