We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    I am building my first site with Revolution, and I’m digging it! laugh

    First problem I have been unable to work out:

    I am trying to create a form customization rule that will move certain tv’s from the tv’s tab to the main tab when a resource is created or updated. I have it working with "core - resource/update" - however, the exact same rule invoked on "core - resource/create" does nothing when a new resource is created with a template that has the tv’s.

    Any suggestions as to what might be wrong? I can post screenshots of my rules if desired.

    It would also be nice if I didn’t have to create two sets of rules - one for create and one for update. Id "core - resource" supposed to handle that? Because my rule invoked on that doesn’t have any effect either.

    Thanks in advance for any help.
      Jason
      • 37059
      • 368 Posts
      Okay, I’ve got it partly figured out. Template variables apparently will only move on the create action if they are accessible to the default template for the resource being created. In this case the "default" was blank. Changing it to the desired template doesn’t trigger the form customization. I can work around this, but I am wondering if it should be considered and filed as a bug?
        Jason
        • 9688
        • 37 Posts
        Hey I have the same problem right now !!! I am trying Modx for the first time and I have the trouble on Revo.

        Did you find a solution ? I didnt get your second post...
          • 37059
          • 368 Posts
          Yes, what I tried to outline in the second post did fix my problem. It goes like this:


          • Make your rule to move a TV to a different tab on create.
          • Set the default template to a template that has access to that TV (or create your resources inside one that does, which will have the same effect).
          • Create a resource and you should find that the TV moves as desired. If not, there be something unrelated wrong with your rules.

          The problem I was encountering was caused by the following non-working scenario:


          • I made a rule to move a TV to a certain tab on create.
          • I gave only Template B access to that rule.
          • I created a new resource, which defaulted to Template A instead of B.
          • I changed the template on the new resource from B, the default, back to A, the template that had access to my TV.
          • I failed to understand why the TV failed to move after the template was changed.

          To an extent, I still don’t understand. I may file it as a feature / bug on Jira.

          Anyway, setting the default template will work.
            Jason
            • 9688
            • 37 Posts
            Thanks for your answer wink

            Anyway I find it strange. If I create a new document, the TV are placed in the first tab. But the resources already created doesnt change... it’s bit boring. Now I know that, I will be more careful.
              • 37059
              • 368 Posts
              It sounds like you may possibly have created the rule to fire on "create" action only? If so, you need to add an identical rule to fire on "update" action as well. I know that’s a bit of a kludge and I am hoping the devs will fix it (vote for the new feature here) - however, I am grateful to have FC at all in Revo. I’m sure it will improve as time goes on.
                Jason
                • 28215
                • 4,149 Posts
                splittingred Reply #7, 16 years ago
                Quote from: kenquad at Oct 06, 2010, 10:18 AM

                It sounds like you may possibly have created the rule to fire on "create" action only? If so, you need to add an identical rule to fire on "update" action as well. I know that’s a bit of a kludge and I am hoping the devs will fix it (vote for the new feature here) - however, I am grateful to have FC at all in Revo. I’m sure it will improve as time goes on.

                Some major FC improvements are slated for 2.1, including, but not limited to:

                - FC Profiles (which contain rules in themselves
                - Active/Inactive Profiles (you can disable entire profiles)
                - Export/Import of Profiles (for easy sharing of rules in the forums) into JSON files (so that you can edit/change FC rules via just editing the JS)

                And a few other ideas. FC improvement is a big target for 2.1.
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 9688
                  • 37 Posts
                  Nice @kenquad !!! Thanks. I’ve created rules with update and it works well.
                  In the value field, is it possible to ad different tv like : tv1, tv2, tv5 huh
                    • 37059
                    • 368 Posts
                    Glad it worked for you. As to adding comma-separated values, that’s something in which several people have expressed interest. I have also added it as a feature request, for which you can vote as well if you want to smiley

                    @splittingred
                    Glad to hear you already have some FC enhancements on the schedule for 2.1! Way to go smiley
                      Jason
                      • 9688
                      • 37 Posts
                      have no login and cannot vote... yet