Question to the new ajax-plugin

4 years 7 months ago #313483 by ericmuc
Question to the new ajax-plugin was created by ericmuc
Regarding your post www.joomlapolis.com/blog/kyle/18852-cb-core-fields-ajax-4-2-0 I updated the plugin and set following conditional szenario:

Field 1
Field 2 conditional shown by content of field 1 = Value1
Field 3 conditional shown by content of field 1 = Value2

example in profile
Field 1 = Value1
Field 2 conditional shown by content of field 1 = Value1

inline axax of field 1 (new, edit of field 1 also shows now conditional field 2 or field 3, new data are stored)
Field 1 = Value2 (changing from value1 to value 2)
+ Field 3 conditional shown by content of field 1 = Value2 (Field 3 instead of Field 2 is shown ! great)

but after storing ajax-inline editing
Field 1 = Value2
Field 2 conditional shown by content of field 1 = Value1 (Field 2 regarding old value of Field 1)

If I now refresh the page, it is shown:
Field 1 = Value2
Field 3 conditional shown by content of field 1 = Value2

You told me in one of my last posts, that the Field 2 or Field 3 with the ajax-inline editing cannot know, that in field 1 is a new value choosen, that will work only in profile edit.

With the new plugin version you have already extended the ajax-inline editing with the conditional fields, but there is one step missing, I think.

May be there is the possibility to change the conditional fields shown in the profile even with ajax-inline editing or there is an automatically page refresh which could be choosen in the field admin area after saving the ajax inline edit.

What do you think?

Thanks.

Please Log in to join the conversation.

4 years 7 months ago - 4 years 7 months ago #313485 by krileon
Replied by krileon on topic Question to the new ajax-plugin
For what you're wanting you need to enable multi-ajax editing. To do this edit Field 1 then for "Additional Fields" select Field 2 and Field 3. You will be able to edit all 3 in a given instance with conditions also working fine.

May be there is the possibility to change the conditional fields shown in the profile even with ajax-inline editing or there is an automatically page refresh which could be choosen in the field admin area after saving the ajax inline edit.

No, that's not going to be implemented at this time. Fields conditioned out of profile view don't exist in the DOM at all. It won't work well trying to force them back into the DOM. This was already explored and determined to be too much work for unreliable results so it's not going to be implemented at this time, sorry. The multi-editing was the best compromise for this functionality. If I determine a more reliable solution at a later time I'll add a forge ticket for it.

A planned feature in a future release is tab ajax editing. Basically to be able to ajax edit an entire tab of fields at once. As long as Fields 1, 2, and 3 are on the same tab then I suppose that functionality would be sufficient for your needs. I do not have a timeframe for that feature though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

4 years 7 months ago #313486 by ericmuc
Replied by ericmuc on topic Question to the new ajax-plugin
Thanks for the quick reply.

But may be I missed something.

1) OK, without enabling the update of the conditional fields in the profile view (not profile edit) with the ajax-inline edit I don't understand the new function regarding the conditional fields. This leads me to 2), how it works generally?

2) I tested a further case without conditional fields:
Field 1 (ajax enabled, Field 2 added as an additional fields)
Field 2

So if I edit with ajax Field 1, also Field 2 is shown for editing. If I save this, only Field 1 shows the new value, Field 2 not. Again, only after page refresh.

So even here I asked me, what is the advantage here? May be I didn't understand the new function. What is the user case for this?

Thanks, best regards

Please Log in to join the conversation.

4 years 7 months ago #313492 by krileon
Replied by krileon on topic Question to the new ajax-plugin

1) OK, without enabling the update of the conditional fields in the profile view (not profile edit) with the ajax-inline edit I don't understand the new function regarding the conditional fields. This leads me to 2), how it works generally?

I don't understand what you're asking here. What new functionality regarding conditional fields? The new feature in CB Core Fields Ajax is just being able to edit more than 1 field at once. This is shown directly on my blog below. Conditions will work during this multi-editing.

So if I edit with ajax Field 1, also Field 2 is shown for editing. If I save this, only Field 1 shows the new value, Field 2 not. Again, only after page refresh.

That's how it's supposed to work. It's not going to refresh any field other than Field 1.

So even here I asked me, what is the advantage here? May be I didn't understand the new function. What is the user case for this?

The advantage is being able to edit more than one field at once. Fields have Layouts since CB 2.0. It's possible for that layout to output more than 1 field. If you combined 3 fields for example into 1 field then you also ideally need to be able to edit those 3 fields at once. One example that's going to be present in the quickstart package is specifying a users gender. The user gets to select Unspecific/Male/Female/Custom and if they select Custom it displays another field for them to supply the custom value so in this case the multi-ajax editing is necessary for that to also work in ajax editing.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

4 years 7 months ago - 4 years 7 months ago #313494 by ericmuc
Replied by ericmuc on topic Question to the new ajax-plugin
addendum "why I have interest in this topic":

if the ajax-inline editing would work also with conditional fields, then everybody could edit his fields in the profile view without using the profile edit view. In the profile edit view (with Community Builder Profile Pro) only the login data could be edit. By this you can seperate editing "normal" data and login data.

At the moment there is no possibility to have different data sets in profile edit view, so that would be a solution.

I try to establish with RSForms the editing of normal data and in profiler edit view editing only login data. But this is an enormous task.

Please Log in to join the conversation.

4 years 7 months ago #313495 by ericmuc
Replied by ericmuc on topic Question to the new ajax-plugin

krileon wrote:

1) OK, without enabling the update of the conditional fields in the profile view (not profile edit) with the ajax-inline edit I don't understand the new function regarding the conditional fields. This leads me to 2), how it works generally?

I don't understand what you're asking here. What new functionality regarding conditional fields? The new feature in CB Core Fields Ajax is just being able to edit more than 1 field at once. This is shown directly on my blog below. Conditions will work during this multi-editing.

So if I edit with ajax Field 1, also Field 2 is shown for editing. If I save this, only Field 1 shows the new value, Field 2 not. Again, only after page refresh.

That's how it's supposed to work. It's not going to refresh any field other than Field 1.

So even here I asked me, what is the advantage here? May be I didn't understand the new function. What is the user case for this?

The advantage is being able to edit more than one field at once. Fields have Layouts since CB 2.0. It's possible for that layout to output more than 1 field. If you combined 3 fields for example into 1 field then you also ideally need to be able to edit those 3 fields at once. One example that's going to be present in the quickstart package is specifying a users gender. The user gets to select Unspecific/Male/Female/Custom and if they select Custom it displays another field for them to supply the custom value so in this case the multi-ajax editing is necessary for that to also work in ajax editing.


OK, I understand, but the user don't see the typed in custom value after saving, only after page refresh, right? hmmm

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.412 seconds

Facebook Twitter LinkedIn