Dropdown box never disabled in registration

18 years 2 months ago #7838 by T.T.
I noted that my dropdownbox was never disabled during registration, even though it was set to disabled in the backend. In the 'edit-profile'-page, it was however disabled.

I edited: base \ components \ com_comprofiler \ comprofiler.php

And changed around line 667 the following:

$vardisabled = ($rowFields[$i]->readonly == 1) ? 'disabled="disabled"' : '';
$rowFieldValues->name] = moscomprofilerHTML::selectList( $Values, $rowFields[$i]->name."[]",
'class="inputbox" size="'.$rowFields[$i]->size.'" '.$multi. ' '. $vardisabled .' mosReq="'.$rowFields[$i]->required.'" mosLabel="'.getLangDefinition($rowFields[$i]->title).'"',
'fieldtitle', 'fieldtitle', $k);


This makes sure that a disabled="disabled" tag is inserted when the item is not editable for a user. Hope this helps anyone. Didnt think this over very carefully, so perhaps there is a better way or this is not a bug at all, but at least it solved my problem ;)

Post edited by: T.T., at: 2006/03/07 11:34

Post edited by: T.T., at: 2006/03/07 11:37

Post edited by: T.T., at: 2006/03/07 11:43

Please Log in to join the conversation.

18 years 1 month ago #8129 by beat
T.T.,

You are right, there is a small discrepency at registration between normal text fields and checkboxes/dropdowns.

But before fixing it either way, I need to understand what's the reason of displaying a readonly field at registration. You could have set for these fields:
Registration: no
Read-only: yes.

Read-only applies to profiles, not to registration (actually for some field types it does, for others no :whistle: ).

What was the reason you wanted to display read-only fields at registration ?

I can see applications for the other way around: having profile-read-only fields editable at registration, and then not anymore in profile edits.

Any other opinions on this subject welcome. :)

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 1 month ago #8143 by beat
Ok. The small discrepencies are now fixed in upcoming 1.0 stable.

The logic follows the majority of field-types (for backwards compatibility):

All fields shown at registration (registration on attribute set) can be filled-in, independantly of read-only attribute.

This allows to have fields which can be filled in only at registration and not changed thereafter (from the frontend).

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.205 seconds

Facebook Twitter LinkedIn