mvt:hide?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • ids
    replied
    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.

    Leave a comment:


  • Brennan
    replied
    Re: mvt:hide?

    Not currently. Can you give me an example of how you would use it?

    Leave a comment:


  • ids
    started a topic mvt:hide?

    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
Working...