• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: default value in dropdown field

default value in dropdown field 13 years 1 month ago #16641

Hi I have a very simple question.

How to introduce the default value in dropdown field.

Thanx for your reply

Francesco
The administrator has disabled public write access.

Re: default value in dropdown field 13 years 1 month ago #16646

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
From the documentation:

www.rsjoomla.com/support/documentation/v...e/57-components.html

Items: this is available for drop-downs (or select lists), radio groups and check-box groups. The items should be specified one per line. This too, can incorporate custom scripts in between the code tags.

The selectable items are composed out of two parts: value and label, separated by the pipeline character (|).
For example: Steve Matt|Steve Matt, marketing director.

Using this formula, the selection will display Steve Matt, marketing director, but Steve Matt will be stored into the database.

You can even have an option selected by default, by using the [c] syntax.
For example: Steve Matt|Steve Matt, marketing director[c]
The administrator has disabled public write access.

Re: default value in dropdown field 13 years 1 month ago #16670

I have a problem - which i have tried to solve via the support documentation but nothing is helping.

I am trying to populate a drop down box with values submitted from a previous form and have the following code in "items" in my drop down box:-

//<code>
$items = "|Please Select[c]\n";
$db =& JFactory::getDBO();
$db->setQuery("SELECT `FieldValue` FROM `jos_rsform_submission_values` WHERE `FieldName`=identity");
$result = $db->loadObjectList();
foreach ($result as $r)
$items .= $r->Identity. '|' . $r->FieldName . "\n";
return $items;
// </code>

please help me - the results are blank...
The administrator has disabled public write access.

Re: default value in dropdown field 13 years 1 month ago #16671

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
@waynedejager what does this have to do with the original posters question? You should start a new thread if you have a new question.

Also, it looks like you have invalid syntax in your SQL.
The administrator has disabled public write access.

Re: default value in dropdown field 13 years 1 month ago #16674

@Royce

thanks for pointing that out - i created a new post.. please give us some help on the errors you mentioned you saw.

tx
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!