Support

  1. jorlan
  2. Support
  3. Monday, January 23 2017, 07:34 AM
Hi,

I would like to extend the functionality of EasyProfile with what I would call: recurring fields that are dependent on an other field. For example, I have a multi select field with a list of educational degrees that a user may have. If he selects one of these, he should be prompted with a date field so he can fill out the date on which he got that degree. And maybe some additional fields as well. And this should be recurring in that this will repeat for each degree. The resulting data should be stored in a single field in json format.

Now I am aware that this could be accomplished by using Easy Profile core functionality for showing and hiding fields conditionally. However it seems to me that the number of fields in the database table will grow enormously, and this will also require the addition of new fields each time a degree (in my example) is added. Do you think database performance will suffer from adding, let's say 70 fields just for this purpose? The number of uers will be up to 1000, presumably not more.

I do have some experience in creating Joomla plugins and I should be able to create a solution myself - when starting from scratch in a core Joomla install. However in this case I would need to add functionality to the Easy Profile plugin. And that does not seem a good idea to me, because of possible updating issues.

Hope that you can tell me what a suitable strategy could be.

Kind regards, Frits
jorlan Accepted Answer
O, I also took a look at creating a custom field type within Easy Profile. It got me up to some point but I could not see how to make it recursive.
  1. more than a month ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
Hi,
Hope that you can tell me what a suitable strategy could be.
The most simplest way is to create a simple textarea field and manage content of this field (in JSON) with javascript. Here an example: https://0.s3.envato.com/files/188465190/index.html

It got me up to some point but I could not see how to make it recursive.
Sorry but Easy Profile does not manage recursive fields.
  1. more than a month ago
  2. Support
  3. # 2
jorlan Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 3
admin Accepted Answer
Admin
Hi,
sorry but we don't make personalized jobs :(
  1. more than a month ago
  2. Support
  3. # 4
jorlan Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 5
jorlan Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,
the error is the same in all browsers, only each browser use own message, HTML of div is not in a JSON format.

All JSON strings start with "{" or "[", so you have these errors
Firefox: unexpected character at line 1 column 1 of the JSON data
Chrome: Unexpected token "u" in JSON at Unexpected token u in JSON at position 0
Safari console is more generic :D
  1. more than a month ago
  2. Support
  3. # 7
jorlan Accepted Answer
Hi,

Thanks for your reply. Though I'm not sure if I understand your answer.

When viewing the source of the original page (without the jquery script running) the output of the text field containing the json string looks like this:

<dd class="erkenningen_detailsValue">{"8":{"id":"8","erkenning":"Erkend clientgericht psychotherapeut","datum erkenning":"2011-01-01"}}</dd>


I see now that the html container is a dd, not a div. I don't know if this makes a difference (I reference it by class, not by it's type).

Anway this is how Easy Profile outputs it to the page. When viewing this it seems to me that the json should be ok. Or do you think there will be some hidden characters inserted somehow?


Frits
  1. more than a month ago
  2. Support
  3. # 8
admin Accepted Answer
Admin
mmmh, yes, it seems ok, instead this:

$( ".class-of-my-div" ).html();

try to use this:

jQuery( ".class-of-my-div" ).text();
  1. more than a month ago
  2. Support
  3. # 9
jorlan Accepted Answer
Thanks again. Unfortunately this throws a different error. In Safari:
SyntaxError: JSON Parse error: Unexpected EOF


Apart from that, the output seems to be processed ok, just as with html()

Frits
  1. more than a month ago
  2. Support
  3. # 10
  • 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.