We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31661
    • 2 Posts
    Just need to add few options from existing data to select tag.
    What i did:
    <label for="cfProduct">Which product do you use?</label>
    <select name="product" id="cfProduct" eform="Product::1" >
    <option value="not specified" selected="selected">Select a product</option>
    [[Ditto? &startID=`18` &showInMenuOnly=`1` &summarize=`10000` &paginate=`0` &tpl=`products_option`]]
    </select>

    But, when i feel form, i have some errors:
    Product » Incorrect value

    What wrong with this code (maybe form parse before parse snippet code, but this is stupid thing) and how this can be fixed?
      • 31533
      • 8 Posts
      Create snippet eFormPlusDitto, fill it with
      <?php
      getChunk("eFormTop");
      $dittoOutput = $modx->runSnippet(
      	"Ditto",
      	array(
      		"startID" => "18",
      		"showInMenuOnly" => "1",
      		"summarize" => "10000",
      		"paginate" => "0",
      		"tpl" => "products_option"
      )
      );
      $formBottom = $modx->getChunk("eFormBottom");
      return($formTop.$dittoOutput.$formBottom);
      ?>
      


      and then call [!eForm? &tpl=`eRegisterFormS`...etc
      Something like that is working for me.

      Actually there’s a problem in eForm -- it doesn’t parse chunks properly like Ditto do.