is it possible to load the account’s products into the installation page (non-html)?
I alredy did it with building a complete own HTML installation page, but I am curious, if there maybe is an option to do with less scripting?
So what I try to achieve is, that you can choose the products (we have around 40) via Multi-Select dropdown, for which a specific process should be triggered.
What does the data-bind option in iparams.json offer? In the documentation it says: Product values (domain name, API key, or complete web-address associated with an account) used to pre-populate an iparam field.
Can I bind the account’s products aswell?
Or can I use the dynamic options for the standard installation page to achieve what I want?
You appear to be on the right track with respect to using the dynamic installation page capability to achieve this.
Have you checked out this sample app for reference? If not, let me point you at the config folder here where you will find an example of a change event associated with an iparam property and a handler attached to the event in assets/iparams.js.
As @Santhosh suggested, Data Methods are not currently available in the installation page. You must instead make a REST API call to get this data back from the handler. If you need to reference other parameters (API-key, domain) to make the request, you will want to use utils.get() to get their current values, and set the options for your drop-down using utils.set().
I’ll not following the dynamic logic anymore, as I need to go a bit more complex.
Originally, I wanted to put all the products into six multiselect dropdowns, as I wanted to build a matrix of six items (let’s call them payment options) x 40 products (which are our retail shops).
But when going that way, I’d have to load 6 iparams (for each payment option) in the app itself, when trying to check for, which paym. options are allowed in a specific product/shop.
Now I am doing the other way round, so in the configuration, I put 40 dropdowns, which all include these 6 payment options (where 1…6 are allowed per product/shop).
This makes the configuration a bit more complicated (and even a bit more dynamic, as new shops come in regularly), but I only have to get one iparam in the app (the payment option set for exactly this product/shop).
Which means, now I have to get all the products and build these dropdowns dynamically.
Which means, I can’t go for dynamic options and I have to build iparams.html.
Or would it even be possible to make new Iparam fields in a dynamic way with just iparams.js?