Jump to content

Inputfield::renderReady hook alternative?


gingebaker
 Share

Recommended Posts

Hi all...

I would like to add some special javascripts files to a Inputfield if certain conditions are fullfilled.
Thats working good with hook Inputfield::___render when the field is directly loaded on ProcessPageEdit.

However I have problems adding these scripts when the Inputfield is not loaded directly on pageLoad. In my case a dynamically loaded repeaterItem.
I found the Inputfield::renderReady method wich seems to be the best place, but it´s not hookable?
https://github.com/processwire/processwire/blob/master/wire/core/Inputfield.php#L1030 )
( the call in Repeater: https://github.com/processwire/processwire/blob/master/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module#L204 )

Is there an "official" way of doing that? Of course I could hook in somewhere else, but that renderReady would be the place to go or am i wrong?

 

Thanks for any information...
Tom

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

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...