BobRay / newspublisher

Revolution version of NewsPublisher snippet
https://bobsguides.com/newspublisher-tutorial.html
20 stars 9 forks source link

Setting Presets on Listbox TVs #51

Open GarretOverstreet opened 6 years ago

GarretOverstreet commented 6 years ago

I've created some listboxes as TVs, but the &presets parameter only works on text input TVs. I tried using some conditional logic on [[+npx.value]] placeholder n the "npListOptionTpl" chunk to compare values, (e.g. [[+npx.value:is=1:then=selected:else=``]]), however, it appears that placeholders cannot be used with snippets.

While a simple workaround would be to not use dropdowns and just swap TVs out for text inputs, I'd like to maintain the functionality of a listbox in the Manager for admins.

BobRay commented 1 year ago

Would it work to set a default value for the TV? I'm not sure how I would implement this in NP.