Announcement

Collapse
No announcement yet.

mvt:hide?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    mvt:hide?

    Is there an MVT:HIDE in storemorph? What would be the syntax?

    MvHide is useful in mivascript for creating hidden input of each element of an array. I think I need this function in SMT.

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    Re: mvt:hide?

    Not currently. Can you give me an example of how you would use it?
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: mvt:hide?

      While I am coding a form; In mivascript I code this:

      <MvHIDE FIELDS="g.ghidden">
      expands into this:

      <input type="hidden" name="ghidden[1]" value="2.000">
      <input type="hidden" name="ghidden[2]" value="6.000">
      <input type="hidden" name="ghidden[3]" value="6.000">

      To replicate this in SMT I need to do something like this:

      <mvt:assign name="g.myvarmax" value="miva_array_max(g.ghidden) " />
      <mvt:assign name="l.settings:counter" value="1" />
      <mvt:while expr="l.settings:counter LE g.myvarmax">
      <input type="hidden" name="ghidden[&mvt:counter;]" value="<mvt:eval expr = "g.ghidden[l.settings:counter]" />">
      <mvt:assign name="l.settings:counter" value="l.settings:counter + 1" />
      </mvt:while>

      To produce this:

      <input type="hidden" value="2.000" name="ghidden[1]">
      <input type="hidden" value="6.000" name="ghidden[2]">
      <input type="hidden" value="9.000" name="ghidden[3]">
      I'd like to see this to help cover arrays:

      <mvt:hide expr="g.ghidden" /> -or- <mvt:hide fields="g.ghidden" />
      This example used global vars because that's what I had laying around. But it's likely more needed when using local vars.

      Thanks,

      Scott
      Last edited by ids; 12-17-15, 03:41 PM.
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment

      Working...
      X