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

TOPIC:

Using JDom, give element id, name 15 Jul 2013 14:24 #10467

I am attempting to use JDom inside my component to make some custom forms for running reports.

How do I set the html element name and id? I want the following code to create a select with the name "facility". I have tried using the "name" property and the "alias" property. Neither of those work. Also, how would I apply a css class to the element as well?
	<?php echo JDom::_('html.form.input.select', array(
		      'list' => $this->facilities,
		      'labelKey' => 'label',
		      'nullLabel' => ' - Facility -'
		));
	?>

Thanks.

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

Using JDom, give element id, name 15 Jul 2013 14:31 #10468

Found the answer. It is the 'dataKey' property.

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

  • Page:
  • 1
Time to create page: 0.054 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