⚠️ Urgent! Active Attacks on MODX Revolution Sites Below Revolution 2.6.5
Subscribe: RSS
  • marielvdoever Reply #21, 1 week ago
    It wasn't working because of spaces inside [[+title]].
    Very very stupid haha.

    What I use now for the form:
    <select name="Value[[+title]]">
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
    </select>


    In the email tpl:
    [[getImageList? &tvname=`WarmeGerechten` &tpl=`@CODE:<p>[[+property.tvname]]:[[+title]] Quantity: [[+Value[[+title]]]]</p>`]]
    • Wow great! So you are getting all the output now? What about the null values?
      • Quote from: nuan88 at Sep 12, 2018, 04:38 PM
        Wow great! So you are getting all the output now? What about the null values?

        Yes I do. The null values are still in the list, so that's not very usefull.
        Already tried all the options you've send earlier.

        So is there a way to show only values higher then 0 ?
        • You could try this:

          [[!getImageList? &tvname=`WarmeGerechten` &tpl=`@CODE:[[+Value[[+title]]:is=`0`:then=``:else=`<p>[[+property.tvname]]:[[+title]] Quantity: [[+Value[[+title]]]]</p>`]]`]]
            ■ email: lk@alienbuild.uk | ■ website: https://alienbuild.uk

            The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
          • Quote from: lkfranklin at Sep 13, 2018, 10:48 AM
            You could try this:

            [[!getImageList? &tvname=`WarmeGerechten` &tpl=`@CODE:[[+Value[[+title]]:is=`0`:then=``:else=`<p>[[+property.tvname]]:[[+title]] Quantity: [[+Value[[+title]]]]</p>`]]`]]

            It isn't working, shows the full list.
            • is the value of 0 selected by default?

              ie:

              <select name="Value[[+title]]">
                      <option value="0" selected>0</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
              </select>
                ■ email: lk@alienbuild.uk | ■ website: https://alienbuild.uk

                The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
              • Yes it shows 0 at default, but I didn't add it in the code like you show above.
                Just tried the code, it still shows the full list.
                • Would this work

                  <select name="Value[[+title:default='']]">

                  [ed. note: nuan88 last edited this post 3 days, 5 hours ago.]
                  • marielvdoever Reply #29, 3 days ago
                    Quote from: nuan88 at Sep 16, 2018, 06:31 PM
                    Would this work

                    <select name="Value[[+title:default='']]">

                    </select>

                    It doesn't change anything, unfortunately.
                    • what do you mean it doesn't work, is there any change or no change?

                      Here is the list of output modifiers, they should work in this case

                      https://docs.modx.com/revolution/2.x/making-sites-with-modx/customizing-content/input-and-output-filters-(output-modifiers)

                      Here are some likely suspects:

                      Equal to
                      [[+numbooks:isequalto=``:then=``:else=`output`]]

                      Not equal to

                      [[+numbooks:notequalto=``:then=`output`:else=``]] [ed. note: nuan88 last edited this post 2 days, 10 hours ago.]