[SOLVED] Auto actions - how to refresh page after an ajax field update

8 years 4 months ago - 8 years 4 months ago #275970 by wrongjon
Hi
We have a user profile field "STATUS" that people write their current status in to. We have another date field that stores the date the status field was last updated.

On the user profile screen we show the date stamp right under the status field

The status field can be edited inline using the core ajax feature.

But after updating the new STATUS field value shows but the date field doesn't visibly update unless you reload the page.... can we write an auto action to refresh the page or another field after an ajax field is edited?

EDIT: just solved this last bit so ignore this bit in brackets [[[ALSO we would like to populate this date field upon user registration with the current datetime and also set the lastupdatedate field to the same date time as this doesnt seem to get populated during registration but wed like it to please so what auto action event can we use please to put current date time in these two fields during registration..... ]]]

Thanks
Jonathan

Please Log in to join the conversation.

8 years 4 months ago - 8 years 4 months ago #275995 by krileon
That kind of defeats the point of having it an ajax field. No, there's not likely a way to redirect after ajax update. Ajax works by sending an ajax post to PHP to update the field value. That ajax post then completes with a response of the fields new display HTML. The entire ajax response process would need to be altered to do what you're wanting or you'd need to bind each ajax usage with your own JS and act on the cbajaxfield.save.success jQuery event to do your reload.

As far as statuses go you maybe better off looking into CB Activity, which provides an activity stream with status posting features.


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.

8 years 4 months ago #276000 by wrongjon
Thanks, yes I had a hunch you would say that and of course you are right :)

thanks for confirming this
have a good week

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.184 seconds

Facebook Twitter LinkedIn