Support

  1. tpelek
  2. General
  3. Wednesday, March 28 2018, 02:28 PM
Hello Support Team,

There is option for drop-down field the default selection be the first option ?

The field will be read only for user and the options will came from database table and I wan't be selected the first option.

Regards.
admin Accepted Answer
Admin
Hi,
I'm sorry but I did not understand. could you explain me better?
  1. more than a month ago
  2. General
  3. # 1
tpelek Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
sorry for late reply, it was night for us.

This is not possible with a simple way, and I can't guide you to the better solution because I does not understand well your purpose.

Also keep in mind that if a field is set to readonly then it will be not stored also when it is filled with a default value.

I want this because I don't want to expose the user names in the site registration form.
To make this there is a very simple solution:
1) Fill username: you can make this from url like https://www.your-domain.com/registration-url.html?username=test
2) Hide username: you can add CSS like this
#member-registration .username-group{display:none !important}


There is also a simple way to hide username, you can set "Login Type" to "Only Email" in Easy Profile Options. This way also hide username in Edit Profile page
  1. more than a month ago
  2. General
  3. # 3
tpelek Accepted Answer
Pro
Hello Thank you for your reply.
I want to use this field as some kind of referral, but I don't want to use the user name but the ID, so I prefer something like ?username=500

I create a dropdown list with options for data base but with this way I expose all users in registration form, by expose I don't mean to the user try to register but if someone take a look on the source code will see all the users.

I think just fill the userid in some text field in registration form and then some other field in profile took this value and show the username, but as you say this is not possible.

Anyway I think different way to do that I want.

Thanks.
  1. more than a month ago
  2. General
  3. # 4
tpelek Accepted Answer
Pro


I think just fill the userid in some text field in registration form and then some other field in profile took this value and show the username, but as you say this is not possible.


I mean the second field username will took data from DB user table and will filter by userid field, but then the username with ID same with userid value is the first option but not selected. That I ask how I can select by default the first option.
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
mmh...you can do this with a javascript like
jQuery(document).ready(function($){
var alias = 'here_the_alias_of_select';
jQuery('#member-registration #jform_'+alias+' option:nth-child(2)').prop('selected','selected');
jQuery('#member-registration #jform_'+alias).chosen('destroy');
});
  1. more than a month ago
  2. General
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Online

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.