1. nickj
  2. General
  3. Tuesday, June 16 2015, 02:48 PM
I'm encountering the following issue:
1. Data is entered in any user profile field (e.g. checkbox checked, date entered, etc.) on the user profile and saved.
2. Based on conditions, some of these fields are hidden (e.g. selecting a different radio option hides a checkbox which was ticked).
3. Save the user profile after some fields have been hidden.
4. Edit the user profile again and change the radio button option so that the hidden fields appear again.
5. Note that data from any of the previously hidden fields has been cleared.

While the fields were hidden when the profile was saved, it should not have cleared the data in any of those fields. Is this a bug? How can I avoid this?
Accepted Answer
admin Accepted Answer
Admin
Hi,

Is this a bug?

No, this is normal, it prevent unexpected behavior of conditions on hidden fields, and incorrect search results.


How can I avoid this?

You need to do a small hack on our user plugin:
- open file /plugins/users/jsn_users/jsn_users.php
- remove or comment lines 500 501 and 502
foreach($removedByConditions as $field){
if(isset($storeData[$field])) $storeData[$field]='';
}
  1. more than a month ago
  2. General
  3. # Permalink
nickj Accepted Answer
Basic
Thanks for the quick reply!

Ideally I would have rather see that conditions are disabled on hidden fields instead, if that otherwise could cause unexpected behaviour, rather than data being updated to blank. But I guess this may be a design decision depending on other user's scenarios.
Thanks for the hack as well - I may actually consider not making fields hidden instead for now to avoid issues when these manual changes are overridden when I update Easy Profile when the next version is released.
  1. more than a month ago
  2. General
  3. # 1
  • 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.