Conditions plugin

16 years 5 months ago #48530 by royce
Replied by royce on topic Re:Conditions plugin
Is this still available?

I can't get to it from the J! code forge. I get a "permission denied message"

Never mind, I just read the first page on Mikko's site. It is no longer on the J! forge

Post edited by: royce, at: 2007/10/22 19:37

Please Log in to join the conversation.

16 years 5 months ago #48536 by dpk
Replied by dpk on topic Re:Conditions plugin
mikko explains what he is doing on his own site, which he has just redesigned. his plugins and other extensions will only be available there, under different fee and for free arrangements. last I checked (a few days ago) he did not have them released yet, but he had an explanation about this. so, "coming soon"...

Please Log in to join the conversation.

16 years 5 months ago #48561 by mikko
Replied by mikko on topic Re:Conditions plugin
I have now half way configured the required stuff. It is possible that I will release today, but it can be also be a couple of days.

Mikko

Please Log in to join the conversation.

16 years 5 months ago #48665 by royce
Replied by royce on topic Re:Conditions plugin
Hi all, I'm new to the conditions plug in and I admit I haven't made it through all 30+ pages of this thread so I hope I'm not covering ground that has been discussed before.

I've just implemented a version of it on my test system. I took a quick look at the source code that is generated and the plug in seems to generate many javascript calls for each drop down choice. I will eventually need a US State/County/School hierarchy so my db could have a huge amount of data and hence a impractically large HTML file.

I guess there is no other way around this aside from making numerous calls back to the server or using AJAX or some other technology. Am I right about this? I may start another thread to see if there is any one else with this issue or is willing to partner on building a AJAX version of this plug in.

I just bought my 1st AJAX book, so I'm not the best person to lead such an effort, but I am willing to try building something and would appreciate any help or suggestions.

Please Log in to join the conversation.

16 years 5 months ago #48705 by mikko
Replied by mikko on topic Re:Conditions plugin
The AJAX thing sounds nice on paper, but before you invest a lot of time to it, you need to be aware of a problem that you will eventually run into.

All field value options are stored in one table. This data is used to generate the fields and also validate the inputs.

Now, the problem is simply:
-If a value exists in DB, CB will generate an option for this value.
-If a value does not exists in DB, CB does not accept this value when it does server side validation of the inputs.

Since the select field is built-in only way of not having an option generated is not to have that option in the fields value table. An obvious workaround would be to store the values somewhere else and create them using client side javascript. Now the problem is that if you create a new value to select on the client side, CB does not accept this value when it validates the input from profile edits.

The options to solve this include:
-hack CB
-write a database abstraction layer (a'la Joomfish) that will control what options CB sees
-write a plugin that temporarily creates values to the field values table (this will lead to problems with synchronization)
-write a field plugin (experimental feature, no documentation available)

Mikko

Please Log in to join the conversation.

16 years 5 months ago #48719 by royce
Replied by royce on topic Re:Conditions plugin
Mikko, thanks for your comments and your plug-in!

From an outsiders perspective, it seems like this would be a great enhancement for CB. It could be a flag on the drop down field during the Admin field definition that says another method (e.g. ajax) is used to generate the field data so CB would not populate the field with the values during registration. It could still do the server side validations, etc.

If that was combined with an AJAX Conditions during User registration it could solve a lot of problems.

Of course I know nothing about the internals of CB or its development process, but I'll throw that out there for the CB wish list.

As it turns out, after discussing this problem with my project manager, he is willing to populate the field values as they become available instead of all at once . :) This is great news for me since I can use the existing conditions plug-in for the foreseeable future. I would still like to assist in such a project so if anyone is up for it, let me know.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.479 seconds

Facebook Twitter LinkedIn