Support

  1. thusby
  2. Features Request
  3. Friday, December 27 2013, 02:11 PM
Is there some method for making read-only fields in the profile?

My application is to import field values into the database based on a field with a membership-number or similar,

like:

User updates membershipnumber, and system imports (background job) various data related to this member.
Accepted Answer
admin Accepted Answer
Admin
Hi,
if the various data not are visible on profile you can use the hidden field type.
if the various data are visible on profile you can use the text field type with some javascript to add readonly attributes to field*** (we can help you do).
but not is a good solution for security (an user can modify the values with some knowledge of html).

in a few days I will release an update with some new feature for the field "text". I can confirm that also add the readonly parameter. Thanks for your suggestion

*** for now, i advise you to use this solution, then in a few days with the new version you can set a true readonly.

There are also other possibilities, but require a minimum of knowledge of php.
example:
add this to file /administrator/components/com_jsn/helpers/fields/text.php at the end of line 50 (about)
'.($item->alias=="fieldalias" ? ' readonly="true"' : '').'

replace field alias with alias of filed that you want readonly
  1. more than a month ago
  2. Features Request
  3. # Permalink
thusby Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 1
cheshirealan Accepted Answer
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 2
admin Accepted Answer
Admin
Hi Alex,
In the lastest version we have added a new parameter for field.
You can hide field in edit profile (on frontend).
You can edit this field on backend with admin account.
  1. more than a month ago
  2. Features Request
  3. # 3
cheshirealan Accepted Answer
OK, I have installed the latest version and can only see same option I had in 1.1.2:

The description you give doesn't match my requirements as I want user to see their membership number in Edit Profile but not be able to change it.

Regards
Alan
  1. more than a month ago
  2. Features Request
  3. # 4
admin Accepted Answer
Admin
OK, I have installed the latest version and can only see same option I had in 1.1.2

go to easy profile
Click to edit you field
Go to 'parameter' tab and set hide on edit profile to yes or no


For your requirement i will send you a mod on monday.
  1. more than a month ago
  2. Features Request
  3. # 5
cheshirealan Accepted Answer
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 6
admin Accepted Answer
Admin
Hi,
replace the file administrator/components/com_jsn/helpers/fields/text.php with the attached file.

We will implement this mod on next release. has more sense that the administrator can modify the fields readonly.

This mod allow you to edit readonly field on backend.
- isn't entered on registration and is therefore absent from registration screens or is READ ONLY
you can set field to show at registration or not, or you can set readonly parameter for this field
- can be viewed on profile on site but not edited (READ ONLY)
you must set readonly parameter for this field
- can be edited in admin user manager (NOT READ ONLY)
resolved with attached file.
Attachments (1)
  1. more than a month ago
  2. Features Request
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

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.