Support

  1. HDcms
  2. General
  3. Friday, September 28 2018, 04:40 PM
Hello,

Tab with custom fields easy profile
case1
case2
....

How is it possible to update the values ​​of another table (other component) from the backup of a tab that has ~ 40 checkboxes

XYZ table with same field value:
ch1 = case1,
ch2 = case2

Regards
admin Accepted Answer
Admin
Hi,
sorry for late reply, it's a weekedn :D

This seems possible but I does not know how the other component save informations.

Anyway to make this you can build a simple plugin, follow these steps:
- Download, Install and Enable Skeleton Plugin (you will find it at http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:
public function triggerProfileUpdate($user,&$data,$changed,$isNew){ 
$alias_of_checkbox = 'HERE_THE_ALIAS';
$values = (array) json_decode($data[$alias_of_checkbox]);
// the $values var will contain a PHP array with values of the checkbox:
$db = JFactory::getDbo();
foreach($values as $value) {
// Query for each value
$query = '....';
$db->setQuery($query)->execute();
}
}
This code will be triggered when user update own profile.

NOTE: This code is not tested and not supported, this is only for example purpose. You need to have a minimum of PHP knowledges
  1. more than a month ago
  2. General
  3. # 1
HDcms Accepted Answer
Hello
Thank you. I look at this. How much would it cost if you did it?
Regards
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Hi,
normally we does not do custom works, anyway this seems something of simple, so probably we can help you to build your plugin for free ;)
  1. more than a month ago
  2. General
  3. # 3
  • 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.