Hi everyone,
I am fairly new to ProcessWire and am trying to get the hang of creating custom InputFields. Specifically, I am trying to combine two of the core inputfield modules into one custom inputfield. Something that looks like this:
The purpose of this InputField:
- Used in the Admin area, in the Edit area of a particular page
- In the search, I query for a particular item that exists in PW
- In the results, I can press an add button besides an item that I am interested
- The items that I added is put on the top (the green area), where I can delete them later if I wish
- I can search for new items, get new results, but the green area with the items that I'm interested in previous searches do not go away (unless I navigate away from the page).
So a couple of questions about this:
- Is the top element (the green part) called InputFieldAsnSelect and the bottom part (the search AND the search results) called InputFieldSelector?
- What is a good way to approach this? I'm kind of at a loss on what to do.
- Do I create a module that extends both InputFieldAsnSelect and InputFieldSelector and try to get them to interact with each other? If so, how? Will this be mostly in JS or in the PHP module? If not, how should I approach this and what should I educate myself on to make this possible?
- My InputField is meant to be able to search all the templates and fields. Would this be possible?
If I get any of the terminology wrong or if a glaring mistake in my understanding of PW is spotted, by all means please point it out.
Thank you!