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

TOPIC:

Unable to select beyond 2nd level within form 14 Mar 2018 22:47 #15509

  • vlemos
  • vlemos's Avatar Topic Author
  • Online
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Hello Admin

Can you resolve this please? Cook is unable to select fields beyond the second level within a form. However, it can resolve the same field selection if it is placed in a filter combo. I am trying to get the name of the user but only get fields from the first linked table.

Thanks
V

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

Unable to select beyond 2nd level within form 16 Mar 2018 04:24 #15512

  • vlemos
  • vlemos's Avatar Topic Author
  • Online
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Hello Admin

Not having alot of time to play with, I was able to resolve this issue quickly by adding ORM functionality to the addSelect routine (see below). I don't know if you would consider looking at whats possible in the near future, but would love to see this limitation resolved so decided to share my 10min approach.

Best regards
v

USAGE:
\components\com_xxx\fork\views\users\view.html.php
	case 'assigned_to':
	/* Ajax List : Users
	 * Called from: view:job, layout:job
	 */
		$model = $this->getModel();
		$model->addSelect(array(
				'userid.name'
		));
		$items = $model->getItems();

MODIFIED ROUTINE:
\administrator\components\com_xxx\fork\classes\model\list.php
	/**
	* Method to store a SELECT entry for the SQL query.
	*
	* @access	public
	* @param	string	$select	
	*
	* @return	void
	*/
	public function addSelect($select)
	{
		if (!is_array($select))
			$this->addQuery('select', $select);

		if (is_array($select))
			$this->orm->select(array(
					$select
			));
	}

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

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

This is what you call a component builder. I was able to master using this in a very short time and the resulting component works like a charm. Not just a basic component builder but a fully working component builder with forms fields tables all ready to go. You can make the list and item views to display in the front and back end. Also there is a great forum just starting to evolve and I'm sure this will grow very rapidly when you all realise how good this tool is.
Kevin (JED)

         

Get Started