×
If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html
select-element
- ibaifer.gmail
- Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 2
9 years 10 months ago #3420
by ibaifer.gmail
select-element was created by ibaifer.gmail
Hello,
I would like to create a select-element in a dropdown like it is shown in the example o the documentation for the "Form" definition. I am not able with this information to create my own form with a select-element. If someone can give my an example how to create it I would be very grateful.
Thanks in advanced.
I would like to create a select-element in a dropdown like it is shown in the example o the documentation for the "Form" definition. I am not able with this information to create my own form with a select-element. If someone can give my an example how to create it I would be very grateful.
Thanks in advanced.
Please Log in to join the conversation.
- Dirk
-
- Offline
Less
More
- Posts: 1222
- Thank you received: 226
9 years 10 months ago #3425
by Dirk
Replied by Dirk on topic select-element
Please be more precise
Do you mean a groupselect?
{joodb groupselect|FIELDNAME}
It's a pro function!
Do you mean a groupselect?
{joodb groupselect|FIELDNAME}
It's a pro function!
Please Log in to join the conversation.
- ibaitxu
- Offline
Less
More
- Posts: 10
- Thank you received: 0
9 years 10 months ago - 9 years 10 months ago #3427
by ibaitxu
Replied by ibaitxu on topic select-element
What I want is to show a dropdown selector in the editor form to allow users to select in one field only between a closed range of options.
As far as I know woth the "Enum" option is possible but i don´t know how to use it.
As far as I know woth the "Enum" option is possible but i don´t know how to use it.
Last edit: 9 years 10 months ago by ibaitxu.
Please Log in to join the conversation.
- Dirk
-
- Offline
Less
More
- Posts: 1222
- Thank you received: 226
9 years 10 months ago #3428
by Dirk
Replied by Dirk on topic select-element
Take a look at the usefull field of the sample database.
It's a type
enum('Yes', 'No', 'Unknonwn')
While category is
set('Sport', 'Food', 'Tool', 'Creature')
With set you can select multiple values.
As soon you have more then 5 Elements in your set it will be a select-box of type multiple!
It's a type
enum('Yes', 'No', 'Unknonwn')
While category is
set('Sport', 'Food', 'Tool', 'Creature')
With set you can select multiple values.
As soon you have more then 5 Elements in your set it will be a select-box of type multiple!
Please Log in to join the conversation.
- ibaitxu
- Offline
Less
More
- Posts: 10
- Thank you received: 0
9 years 10 months ago #3430
by ibaitxu
Replied by ibaitxu on topic select-element
I´m sorry
I erased the sample database. Can you only write an example of how and where to define the "set" option.
Sorry and I apologize again.
I erased the sample database. Can you only write an example of how and where to define the "set" option.
Sorry and I apologize again.
Please Log in to join the conversation.
- Dirk
-
- Offline
Less
More
- Posts: 1222
- Thank you received: 226
9 years 10 months ago - 9 years 10 months ago #3434
by Dirk
Replied by Dirk on topic select-element
Sorry but this goes to far.
Take a tool like PHPMYADMIN and add or change the field you want to use as SET-Selection.
In PhpmyAdmin you only need change the type to SET to and add a comma separated list of values.
Like this: 'Sport','Food','Tool','Creature'
dev.mysql.com/doc/refman/5.0/en/set.html
Take a tool like PHPMYADMIN and add or change the field you want to use as SET-Selection.
In PhpmyAdmin you only need change the type to SET to and add a comma separated list of values.
Like this: 'Sport','Food','Tool','Creature'
dev.mysql.com/doc/refman/5.0/en/set.html
DROP TABLE IF EXISTS `joodb_sample`;
CREATE TABLE IF NOT EXISTS `joodb_sample` (
`myid` int(1) NOT NULL AUTO_INCREMENT,
`title` varchar(100) NOT NULL,
`value` varchar(10) DEFAULT NULL,
`usefull` enum('Yes','No','Unknonwn') NOT NULL DEFAULT 'Yes',
`picture` varchar(100) DEFAULT NULL,
`short_description` text,
`description` text NOT NULL,
`wikipedia` varchar(254) DEFAULT NULL,
`category` set('Sport','Food','Tool','Creature') NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`state` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`myid`),
KEY `title` (`title`),
KEY `state` (`state`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Table with joodb sample nosense data. Save to remove';
Last edit: 9 years 10 months ago by Dirk.
Please Log in to join the conversation.
Moderators: Dirk, joest