Jump to content

Dynamically updated (via ajax) inputfields/fieldtypes


Recommended Posts

Good day!

Some inputfields/fieldtypes need to be saved before you can continue to work with them. Here are examples:

  1. In Combo PRO field one subfield can be used as a source of select options for another subfield.
  2. ImageMarker Fieldtype needs to be saved after the image is added before you can add markers.
  3. there are probably other cases (and surely a lot of plans to add new ones in my head)))

That is not convenient for the end user. I would like to find a way to dynamically update the field in admin without the need for a page reload.

The one thing to do this I could think of is using Page Autosave + Live Preview but it does save the whole page, which might be too much. And it is a paid module, so not for open source fields. And I would like to keep this in the fieldtype/inputfield module so no dependencies.

My friends, do you have any solution and/or thoughts how this can/should be implemented? Maybe there should be some common mechanism for that in the corresponding base classes?

P.S. I guess the reload should be made in such a way that hooks attached to field save could be avoided.

Link to comment
Share on other sites

The reload part is already there:

Inputfields.find('title').trigger('reload');

I don't know if there is a way to update the field's value. I don't think so. But it would be great to have such a feature 🙂 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...