We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31902
    • 342 Posts
    Is it possible to move the Unpublish Date field, which is located within the Settings tab, to the Template Variables tab (or other place)? Or at least, can the same functionality be duplicated in a field somewhere within the Templates Variables tab?

    This is within MODx Revo 2.2.2
      • 39932
      • 483 Posts
      I can't imagine why you would want two copies of the same field on the same Resource. Can you explain why you need this?
        Website: Extended Dialog Development Blog: on Extended Dialog
        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        He'd rather move it, but if it can't be moved, he'll settle for a duplicate.

        That said, I think the Form Customization can move just about anything to just about anywhere, at least in the Resource editing pages.
          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
          • 39932
          • 483 Posts
          He means move it in the form? Not in the database?

          Yes, Form Customization can do this, rather easily.
            Website: Extended Dialog Development Blog: on Extended Dialog
            Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
            Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

            Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
            • 31902
            • 342 Posts
            Hi folks. Thanks for responding.

            Yeah, I meant within the form itself. What happened is that I had installed the eventsCalendar2 component, which has become something of a standard install thing with sites around here. On this site, though, the boss wants me to get the calendar to get rid of events after they have happened. So, I figure the best way to do this is to get the system to unpublish the event after it's done with.

            I first wondered if eventCalendar2 had a feature to do this and, in fact, asked the question on this forum thread here:

            https://forums.modx.com/thread/?thread=74010&page=3


            ...which is a thread I had started as a little tutorial on the eventCalendar2 component. As of this writing it is the last post on that thread. But apparently, no joy following that route. With that component, the place to enter the date of the event is in a section within the TV Variables tab (I've renamed that tab in the control panel to 'Page Content') in a TV called event_date.

            So, I'm thinking that the next thing to do is move the unpublish field over to that calendar section of the Page Content tab (formerly known as TV Variables tab) so that the site editor has the start of the event and unpublish fields next to each other.

            A bit long-winded of an explanation, but that's what I'm trying to do here.

            Okay, so I've got to look into the form customization route, I guess. [ed. note: waizen last edited this post 14 years, 1 month ago.]
              • 31902
              • 342 Posts
              Alright, so after a morning of researching this, and realizing that I may just be overlooking the answer sitting in front of my nose, it would seem that it is not possible to move a core field from the Settings tab to the Template Variables tab (or anywhere else).

              I found where I can turn the visibility on/off through the form customization area, as well as re-label it. But, nothing about moving it. I also found many tutorials about moving custom TVs there, etc., but not the core ones, such as Unpublish Date (unpub_date). I did find that someone had entered a bug report here asking about it:

              http://tracker.modx.com/issues/5818#change-13431


              ...(which probably shouldn't have been entered as a bug report, but I digress) but then @splittingred changed the status to closed without further explanation.

              Can any of you MODx Gods out there tell me I'm (hopefully) wrong?

                • 40385
                • 75 Posts
                Why don't you move the TVs to the Settings Core tab where the unpublish date field is located?
                  • 31902
                  • 342 Posts
                  @paul_kemp : The shear number of TVs that have to do with the calendar section of the page (not the component, just the page itself) and other things, organizationally dictate they stay where they are. Besides, I want to minimize the editor's involvement with the Settings tab without committing to hiding it completely.
                    • 3109 ☆ A M B ☆
                    • 894 Posts
                    If you need help with Form Customization make sure to read my tutorial on how to use it.

                    Form Customization Tutorial

                    I hope that helps you get a better understanding of how it works.
                      Benjamin Marte
                      Interactive Media Developer
                      Follow Me on Twitter | Visit my site | Learn MODX
                      • 31902
                      • 342 Posts
                      @benmarte : I recognize your tutorial as one I ran across in my research this morning. It's a good tutorial but unfortunately it didn't cover my specific problem. Yes, I can see how to add a custom TV somewhere in the Settings tab, make different fields visible or not, rename them, etc., but not how to take one of the core fields that come with MODx, such as the Unpublish Date field, as in my case, and move it from the Settings tab to the TV Variables Tab.

                      This particular project has a whole bunch of Form Customization done already for a bunch of things, so I am a bit familiar with that part of MODx. It's just that darned Unpublish Date field that's been grinding my gears lately.

                      Thanks for responding, though.