The problem is that you simply can’t use a ditto call inside an eform template. The ditto call isn’t executed until AFTER eForm is finished. Therefore eForm only sees the Ditto call itself and not the values and form elements it produces.
"But it works for the rest... " I can hear you say
That is because the Ditto generated markup is inserted into the document during the next document parser round. Here’s what happens...
<form id="testForm" action="[~[*id*]~]">
<input type="text" name="Name" eform="Name::1" />
[[Ditto.....]]
<form>
the document parser finds and runs the eForm snippet. eForm parses the above form and returns it to the document. It will now look like this:
<form id="testForm" action="[~[*id*]~]">
<input type="hidden" name="formid" value="testForm" />
<input type="text" name="Name" class="[+vClass_Name+]" value="[+Name+]" />
[[Ditto.....]]
<form>
eForm is finished and has build up a list of fields and properties from the form. In this case it has only found one field "Name" with the property "required field"
During the next round the document parser now sees a Ditto call and runs Ditto. Result:
<form id="testForm" action="[~[*id*]~]">
<input type="hidden" name="formid" value="testForm" />
<input type="text" name="Name" class="[+vClass_Name+]" value="[+Name+]" />
<input type="checkbox" name="maara[]" value="[+longtitle+]: [+pagetitle+]" eform="[+pagetitle+]::1"/> Choose item and number of items
<select name="maara[]" eform="maara">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<form>
All looks good in the browser but sadly this is too late for eForm... eForm is no longer running.
Hope this clarifies things a bit for you.
The only way of achieving this is to run ditto inside an event function which is triggered by the eformOnBeforeFormParse event and insert Ditto’s result into the form template. That way eForm can parse Ditto’s output.
There’s plenty of info here in the forum or in teh wiki on how to use eForms events and there’s also some example in the eForm documentation in assets/snippets/eform/docs/