Support

  1. daniel-j
  2. Support
  3. Wednesday, April 22 2020, 11:51 AM
[img]https://sew-loved.org/SLMasks/Battalion/Images/EasyProfile_question_Radio%20Element2020-04-22_051442.png[/img]

How would I go about to allow a person with special access rights to edit / delete/add values to this defined field(radio)
I use the import / export feature quiet extensively and would like an option for
a administrator access to review a list and mark it to reflect a current status for the above profile element. Either by filling in a value and applied to the list or individually. Is this possible?
Daniel
daniel-j Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
Hi,
How would I go about to allow a person with special access rights to edit / delete/add values to this defined field(radio)
An administrator* can edit other user profiles from backend.

I use the import / export feature quiet extensively and would like an option for
a administrator access to review a list and mark it to reflect a current status for the above profile element. Either by filling in a value and applied to the list or individually. Is this possible?
Sorry but this seems not possible. The best way is to send import file with some other way and after an admin review then he will use import feature.

Also can I allow back access for a special access rights for just the search and create a list or for import/export feature of Easy Profile?
In the backend the import feature is subordinate to users management access. But there is another way, in our download are you will find a plugin called "User Import Plugin (frontend)", you can install this plugin and in plugin options (Extensions->Plugins) assign an Joomla access level (http://docs.easy-profile.com/index.php/article/import-plugin)

About parameter to fill options from DB: basically these parameters allow you to fill field (radio/checkbox/select) options from DB. You can use an example by using placeholder in the parameters:
Table: #__content (this is the table where Joomla store articles)
Column for value: id (the table #__content uses a unique column called id, this is the id of the article, this is what the radio option have set as value)
Column for title: title (the table #__content uses a column called "title" to store the title of the articles, this is what you will see in the radio field as option text).
SQL WHERE....: This is the WHERE statement in the SQL that retrieve records, in the placeholder there "state=1", "state" is the column where Joomla store the published status of the article, so only published articles
Attachments (1)
  1. more than a month ago
  2. Support
  3. # 2
daniel-j Accepted Answer
Could I use these to update our status field and other fields in the Easy Profile

Set Value of User Object

$user=JsnHelper::getUser(); $user->field_alias=value;

$user=JsnHelper::getUser(); $user->status=Active Duty;
or

$user=JsnHelper::getUser(); echo $user->setValue('status','Active Duty');

Save User
$user=JsnHelper::getUser(); $user->status=Active Duty; $user->save();
  1. more than a month ago
  2. Support
  3. # 3
admin Accepted Answer
Admin
Hi,
yes but it require to have a bit of PHP knowledges.
  1. more than a month ago
  2. Support
  3. # 4
daniel-j Accepted Answer
Okay... so where would I put this helper?
I have the ability to add PHP code in a form that will execute upon submission of the form... actually before or after submission...
Where would I invoke the helper - "require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');"
Is this something I place in code before using $user=JsnHelper::getUser(); echo $user->setValue('status','Active Duty');
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Hi,
Okay... so where would I put this helper?
Sorry but I don't sure. I don't know that your form do and how it is managed, anyway you can try to add this code after submission.
Where would I invoke the helper - "require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');"
Is this something I place in code before using $user=JsnHelper::getUser(); echo $user->setValue('status','Active Duty');
Yes, you should add this before the code. Also after assign the value to status you should save the user object with $user->save()
  1. more than a month ago
  2. Support
  3. # 6
daniel-j Accepted Answer
Could you provide an example of how one would use this within Joomla? I have an extension ("Fabrik", where I can use PHP and Javascript within a form). I am curious how others may use this
$user=JsnHelper::getUser(); echo $user->setValue('status','Active Duty');
$user->save()
  1. more than a month ago
  2. Support
  3. # 7
daniel-j Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 8
admin Accepted Answer
Admin
Hi,
sorry but we does not know how you want to reach your goal. We can only point you on the right direction.

Could you provide an example of how one would use this within Joomla? I have an extension ("Fabrik", where I can use PHP and Javascript within a form). I am curious how others may use this

About update the status of the user, if you are not confidence with the PHP code proposed or maybe there is some problem using API (due to many triggers) then you can use a code that update the field value directly with a SQL query:
$db = JFactory::getDbo();

$query = 'UPDATE #__jsn_users SET status = "Requested" WHERE id = ' . JFactory::getUser()->id;

$db->setQuery($query);
$db->execute();



$user=JsnHelper::getUser(); echo $user->setValue('status','Active Duty');
$user->save()
the value "Active Duty" does not seems a value in the radio options

Parameter "Options inline"
This parameter allow you to set how to show options in the edit profile/registration form, inline mean in a row

Parameters in "Fill following....Option from DB"
The only restriction is that the table must be in the same Database.
Probably for your purpose these options are not useful because you already have specified all options.
  1. more than a month ago
  2. Support
  3. # 9
daniel-j Accepted Answer
Thank you for responding!
Let's start over...
I need to do a value update to Easy Profile field..
I would like to do so to the radio button update at some point but I have a need that I would like to find a solution first.
( Sorry the active duty example before was another form I was going to use that was not a radio button.)

So here is what I want to accomplish.
I have a front end form (see pictures below) that is used by a Special (ACL) User who selects a User and records a status for that sewer (one user name in dropdown list). It selects by the User Name in a dropdown selection box. I would like to obtain the email address of the user after the name is selected.

The Special (ACL) User would then select from a radio button one of 4 values for bp_mailing_status.
I would like that status to update the Easy Profile field that corresponds with the radio button Selection. I would like to have User Name(firstname/lastname) , email address of the selected user and then the bp_mailing_status selected from the radio button in the form. I would rather have a direct update to the field in Easy Profile instead of creating a csv list and importing the results so that the assigned Special User does not have to go into the backend to update Easy Profile. I can Join the JSN User table or use PHP or Javascript within the form if needed.

Thoughts?
  1. more than a month ago
  2. Support
  3. # 10
admin Accepted Answer
Admin
Hi,
we does not have experience with Fabrik, we can only propose you how to change data in Easy Profile. Easy Profile simply store data in the table #__jsn_users, so the most sicure way to reach this requirement is to alter value in this table. But I don't know how to alter these values from Fabrik.
  1. more than a month ago
  2. Support
  3. # 11
daniel-j Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 12
admin Accepted Answer
Admin
Hi,
is there something equivalent to this in your API? to grab one of your fields in the jsn_users table?
<? $user =& JFactory::getUser(); ?>
And show user name in text field value.
<? echo $user->name; ?>
Yes the equivalent is:
require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user=JsnHelper::getUser();
echo $user->name; /*or something else like $user->field_alias */
  1. more than a month ago
  2. Support
  3. # 13
  • 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 Offline

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.