Jump to content

Field with dynamic (realtime) percent calculation with values from other fields


Recommended Posts

Hello there

I need a field with realtime percent calculation (without page save)  with values from other fields in admin template. I think about jQuery with onChange methods on corresponding fields but this is not clear for me how to do this in module. Any help with some advice or example will be highly appreciated! 

Thanks in advance! 


Link to comment
Share on other sites

3 hours ago, kixe said:

This fieldtype will generate any runtime markup:

Hi @kixe,

I hadn't seen this before. I just had a quick look around and from what I can tell, it's a simpler version of @kongondo's RuntimeMarkup in that it doesn't allow you to use PHP to generate the markup.

Would you mind describing the differences for us please?


  • Like 2
Link to comment
Share on other sites

On 9/9/2018 at 12:43 AM, adrian said:

Would you mind describing the differences for us please?

In fact, these modules are very similar. That's why I did not publish my module in the Processwire module directory.

small differences:

  • I use the builtin InputfieldMarkup
  • I don't use eval()
  • No need to create a new field if used in another template. Simply overwrite the output template based.

The basic usecase is to set the markup field and template/field based. Via string tags all pagefield values and other page properties are accessible. Any textformatter can be applied. Full Language support. For more complex calculations the output is hookable and the full PW API can be used to create the output, not only $page or $pages.

A page (A) has been assigned to another page (B) via a page field. I want to show some informations about (B) inside (A)




  • Like 7
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

  • Create New...