Bug: Default values not working

12 years 5 months ago #65491 by c_schmitz
Bug: Default values not working was created by c_schmitz
Hi!

I found default values for text fields not working with 1.2RC.
The field in question is not shown at registration and readonly for the user and I want to set a default on it when the user registers/confirms.

Set the default value property of the field, but it does not happen. Field stays null.

Clean Joomla 1.0.15 installation, no custom plugins.

Any question? Feel free.

Best regards

Carsten

Please Log in to join the conversation.

12 years 5 months ago #65508 by nant
Replied by nant on topic Re:Bug: Default values not working
What field type?
What is the default value?
Does the default value appear as column default value in database (comprofiler table?)?

Please Log in to join the conversation.

12 years 5 months ago #65527 by c_schmitz
Replied by c_schmitz on topic Re:Bug: Default values not working
Actually I could reproduce this with text and single select field type, I didnt test other field types so far.

It doesn't matter if I set the default vaule right when I create it or edit the field settings afterwards and set it.

There is no default value on the mySQL column table.
It is a normal default value like 'test'.

Please Log in to join the conversation.

12 years 5 months ago #65530 by beat
Replied by beat on topic Re:Bug: Default values not working
Hm...bug or "feature" ?

Right now it's a "feature": the "default" value is only set as a proposed value during registration for fields shown on registration.

So if a field is *not* on the registration form, CB doesn't put that default value for the user "behind his back" :D

What are community thoughts on this ?

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.

12 years 5 months ago #65544 by KurtSteiner
Replied by KurtSteiner on topic Re:Bug: Default values not working
beat wrote:

Hm...bug or "feature" ?

Right now it's a "feature": the "default" value is only set as a proposed value during registration for fields shown on registration.

So if a field is *not* on the registration form, CB doesn't put that default value for the user "behind his back" :D

What are community thoughts on this ?



Hi Beat,
first thought was that a default value should be stored, but the second thought opened my eye for this feature.

I would like to keep it as it is.

(my wish is a future plug for the profile fullfillment level - stored default values would make it impossible to count empty fields)

sunny regards from Germany

BERND (Kurt Steiner)

Please Log in to join the conversation.

12 years 5 months ago #65552 by c_schmitz
Replied by c_schmitz on topic Re:Bug: Default values not working
I can partly agree.

Why would you use a default?
Because you want a a field defaulted to a value.
What the function does now is a pre-fill at registration time - so the labeling of this feature should maybe be adjusted.

I don't think changing the existing feature is a clean way, but maybe have another one.

Have a second option to choose if this value is also to be set without registration (aka a real default value)

Right now I have to write a plugin that prefills the field with Update statements.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.416 seconds

Facebook Twitter LinkedIn