Support

  1. whitejedi86
  2. Support
  3. Thursday, August 11 2016, 11:05 PM
how can i show/hide fields in the edit profile view, based on a value stored in the registration; it seems the rules that i have in a hidden filed are not quite working
References
  1. http://www.studimi.de/
admin Accepted Answer
Admin
Hi,
sorry we does not support custom code, anyway your function seems wrong, at line:

$query->select($db->quoteName(prof);


- prof is not a var, it is a string so you need to replace with 'prof'
- you not have closed function select, missing ";)"
  1. more than a month ago
  2. Support
  3. # 1
whitejedi86 Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
sorry but I not understand your question.

this is a hidden field, so the user never change value, you will change value from db lookup and already trigger change event.
In my code below you change value and launch change event.
  1. more than a month ago
  2. Support
  3. # 3
whitejedi86 Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
Hi,
you can use a simple workaround that do this without hack: you can simply fill value with javascript.

for example you can add something like this in your template (index.php)

<?php
// PHP CODE TO FILL VAR $your_value FROM DB
?>
jQuery(document).ready(function($){
$('#jform_aliasOfHiddenField').val('<?php echo $your_value; ?>').change();
});


NOTE: when you fill the value you need also to launch .change(), this trigger change events and apply conditions to hide/show fields
  1. more than a month ago
  2. Support
  3. # 5
whitejedi86 Accepted Answer
can i make a hidden field that reads the stored value from the db and based on that autopopulates the form? i what kind of workaround do you use for this kind of behavior?
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,
see screenshot 1

You have set this condition:
If "Rules" (hidden field) is equal to "Anmelden asl" hide fields.

But rules is empty so this condition is never met.

"Custom Value" in conditions is ignored, because you have choose to compare with another field and not with "Custom Value", see screenshot 2
Attachments (2)
  1. more than a month ago
  2. Support
  3. # 7
  • 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.