Hi there,
I'm using a multi-select listbox TV that works fine on the front-end.... until someone chooses to edit the related resource. When one does open its TV tab, the previously chosen values are no longer displayed. If the user edits some other field within the resource, then saves it, the multiselect listbox values get cleared, so it goes wrong in the front-end... I can't find out why this happens. Is this an issue ?
Thank you very much to anyone that can help... !!!
Sorry for that ⇧ , I'm no dev but I wanna try
-
☆ A M B ☆
- 222 Posts
Some details are needed:
What version of MODX?
What is the configuration of the TV (the input values... are they hard-coded or are you running a snippet to fill them in)
When you select an item, is it saving to the modx_site_tmplvar_contentvalues table (you need to check this with phpMyAdmin or some other db tool)?
Is there anything in the MODX error log?
The clearing when you edit a resource makes me think that either the value is not being saved to the database, or the value cannot be interpreted by the TV on resource render in the manager (it is getting a value sent to it that there is no match for in its input options... this is the value part of the name/value pair)
Thanks for your answer Jason, your post led me to the solution.
Actually I did not think about checking in the DB, so I did.
I found out that the values get stored in the database. But what looks weird is that they are stored with an empty line first, I won't be clear so you can have a look at
this picture...
It isn't that weird when you know that, noob inside, I typed the inputs this way
ARES||
ARKOSLIGHT||
ARTEMIDE||
ASTRO||
AURA LIGHTING||
instead of
ARES||ARKOSLIGHT||ARTEMIDE||ASTRO||AURA LIGHTING||
Now that I fixed the TV's inputs... it seems to be okay. Thank you again Jason.
Sorry for that ⇧ , I'm no dev but I wanna try