On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I’m developing a real estate site that uses lots of check-boxes for quick data entry. It’s to be bilingual French and English.

    Over the years I have developed a highly modular approach: my templates call chunks and TVs, mostly chunks, and my chunks call snippets and TVs. TVs often call snippets. My templates at least are nicely simple - just structure. The rest can be, shall we say, a bit derivative. Works for me, anyway.

    I could not get checkbox TVs to work at all. They wouldn’t fall under the correct language tab, only under general, and the [[Yams?]] calls weren’t working either, even if placed in the correct language [*content*] standard TV. I suspected the failure to correctly tab by language was the problem.

    I have now established that checkbox TVs won’t tab properly, and nor will listbox-multi-select TVs. They only appear under the general tab. On the other hand, TVs with input type: Text, Textarea, Rich Text, Dropdown List Menu, Listbox single select all work fine. (I haven’t tried the other TV input types, nor have I tested any widgets).

    By entering the [[YAMS?]] snippet call directly in the template instead of via a chunk or via a standard (eg [*content*]) TV, I can retrieve the data, including multiple selections from listbox multi-select and from checkboxes. The correct language option is displayed. So now I can get on with building the site.

    Now that I am sure that the data is retrievable (even if the tabbing doesn’t work for checkboxes and listbox multiples) I will get on with trying to figure out how to use my highly nested structure.

    I would like to solve the tabbing problem though: my client would prefer not to have three places to enter data...

    Any ideas?

    Nic Boyde

    MODx 1.0.5
    YAMS 1.1.9
    PHP 5.3.6
    MySQL 5.1.56
    ManagerManager 0.3.9
    pdo-mysql installed
    No PHx
      MODX Revolution 2.6.5-pl (traditional)

      Hosted on MODX Cloud

      Skype: nicbaldeagle
    • I suspect that this may have as much to do with ManagerManager (which is responsible for tabbing) as with YAMS itself. Check the YAMS MM configuration file; it may need to be edited manually to properly set the MM rules (assets/modules/yams/yams.mm_rules.inc.php).
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • Dear Susan

        I’ve just had the same idea and gone to have a look. The code looks through the site_tmplvars table and separates the standard MODx TVs and custom TVs all ending in _id (where id = en, or fr etc).

        It doesn’t seem to, as far as I can tell, distinguish between TVs by input type.

        But it does, somehow, because it doesn’t tabify these two Multiple-Answer input types.

        I’ve also had a look at the site_tmplvars table just to make sure that the checkbox custom tvs are correctly stored there. They are.

        So I’m stumped. Thanks for the suggestion, though.

        I think Virtual Gadjo http://modxcms.com/forums/index.php?action=profile;u=17212 has just come across the same issue.
          MODX Revolution 2.6.5-pl (traditional)

          Hosted on MODX Cloud

          Skype: nicbaldeagle
        • hi,

          yes, i came across the same kind of issue but for custom TVs solved it as i mentionned in my auto answer, too bad, this doens’t solve your...
          reading your post, i’ve tried checkbox and multiple choice list and ran into the same thing as you did...

          i’ve dug into yams and MODx file to see where that comes from but so far, i haven’t got the answer, or, at least, the solution, because after a long reading of all the concerned files i’ve got the beginning of a clue...
          Those two tv are the only one for which the value is first exploded and it is the only difference i could found out between them and the others that are perfectly dispatched in the correct tabs
          Then, i’m wondering if the solution wouldn’t be to set YAMS plugin execution before other MODx behavior for other system events. i’ve tried on tvformprerender and tvformrender but too bad it doesn’t work...

          i’m on it smiley if ever i find out a working solution i’ll of course let you know

          Have swing
            réfléchir avant d'agir
          • Thanks for confirming it isn’t just me and my set-up. Always good to know...

            Yes, please post something if you find the answer: I’ll keep looking at the problem as well - (once I’ve got the site built and the client happy). It’s not the end of the world, because they work: the French data is shown on French pages, and the English where it should be, and the monolingual fields shown correctly too.

            Just annoying a little bit.

            Plus ça change...
              MODX Revolution 2.6.5-pl (traditional)

              Hosted on MODX Cloud

              Skype: nicbaldeagle