Hi
I am new to formapi. I would like to access the replicants inside a container using formapi. Looking at the "userscript/position" datatype in the example provided for formapi, if I have the type, rate, hours & yearly fields inside sub-containers and replicants like below, can anyone please help me build the js including the init. Thanks
In my case, I have the link replicant element inside containers. I would like the docsize item appear only if PDF type is chosen. Can someone please help me create the generic.js thanks a lot!
My datacapture looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<data-capture-requirements dtd-system-identifier="
http://localhost/iw/position.dtd" dcr-validation="none" name="">
<ruleset name="dct">
<root-container combination="and" location="generic" name="generic">
<container combination="and" max="10" min="1" location="body" name="body">
<container combination="or" location="element" name="element">
<container max="20" min="1" combination="and" location="link" name="link">
<item max="1" min="1" name="type" pathid="type">
<label>primary/secondary</label>
<radio>
<option selected="t" value="F" label="primary"/>
<option value="T" label="secondary"/>
<option value="P" label="PDF"/>
</radio>
</item>
<item max="1" min="1" name="text" pathid="text">
<label>Text</label>
<description>Link text here</description>
<text maxlength="4" />
</item>
<item max="1" min="1" name="URL" pathid="URL">
<label>URL</label>
<description>link URL here</description>
<text maxlength="20" ></text>
</item>
<item max="1" min="1" name="docsize" pathid="docsize">
<label>Document Size</label>
<description>Enter the PDF document size here in KB</description>
<text maxlength="4" />
</item>
</container>
</container>
</container>
</root-container>
<script language="javascript" location="template-type" src="generic.js"/>
</ruleset>
</data-capture-requirements>