Default value on Drop Down field

18 years 3 months ago #924 by Viames
Default value on Drop Down field was created by Viames
I would like to set a default value for Drop Down (single select) fields, so user have it visible when activated account. It's useful on read-only fields, so you haven't set it for all users.

An example of its use is set a standard role that everyone in the community must have, like chat users. If promoted, they will get another value (voice, op).

Thank you.

CB italian translation & testing
translations on joomla.it
homesites: Viames.it , Crotone on Web

Please Log in to join the conversation.

18 years 3 months ago #939 by beat
Replied by beat on topic Re:Default value on Drop Down field
Viames wrote:

I would like to set a default value for Drop Down (single select) fields, so user have it visible when activated account. It's useful on read-only fields, so you haven't set it for all users.

An example of its use is set a standard role that everyone in the community must have, like chat users. If promoted, they will get another value (voice, op).

Thank you.


Hint for an easy hack without hacking PHP (not a feature yet!) : take a deep look at __comprofiler_fields table... ;)

There is an tinyint field "default". :)

You may change its type to "mediumtext", and set a value for the field you need to have a default value for. :(

This might help you for RC2, but I don't guarantee future compatibility, when this becomes a real feature, as we might very well change the fields management itself as planed. :P

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

18 years 3 months ago #966 by Viames
Replied by Viames on topic Re:Default value on Drop Down field
Thank you beat for that tip, I will try that ;)

CB italian translation & testing
translations on joomla.it
homesites: Viames.it , Crotone on Web

Please Log in to join the conversation.

18 years 3 months ago #1068 by geeffland
Replied by geeffland on topic Re:Default value on Drop Down field
Thanks I was looking for a similar feature (except for a text field)

CB3PD Developer - CB Connector (formerly phpBB Connector) plugin

Please Log in to join the conversation.

18 years 4 weeks ago #7204 by aaktas
Replied by aaktas on topic Re:Default value on Drop Down field
Hi,
I have seen this thread on the forum and made your suggested change to enable dropdown fields having default (selected value) but no luck.
Not sure if i have made mistake following the instructions, or it has not worked for any other reason, any help would be useful
Is there any hack in the script that would allow me a simple selected value "Please select" for any drop down fields created in Community builder Field Manager? As "Please Select" would be a generic selected value, it would be great to handle it for any drop down fields created.

Hoping to get some ideas/help as i am a totally newbie in here :(
Thanks in Advance

Please Log in to join the conversation.

18 years 4 weeks ago #7213 by beat
Replied by beat on topic Re:Default value on Drop Down field
This non-feature should work on all field types, obviously you need to put in the appropriate content.

It's a not supported feature, so you're on your own ;) maybe somebody can help you.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.271 seconds

Facebook Twitter LinkedIn