Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Invoking FormAPI
summergs
Hello,
I am attempting to learn how to use FormAPI, however, I have thus far not been able to get it to work. Supposedly, I am able to embed the code within the DCT. Do I need to set up something in IW.cfg, or an ENV variable to get FormAPI to work, or is it that my code is flawed? My DCT appears as follows:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE data-capture-requirements SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="events">
<!-- data-capture-requirements elements contain area elements -->
<ruleset name="Event Information">
<description>
Allows the entry of Event information.
</description>
<container name="Event Information" combination="and">
<item name="EventAddress">
<replicant min="1" max="3">
<item name="Address" rowcontinue="f">
<description>Enter the Address of the Event</description>
<database data-type="VARCHAR(120)" />
<text size ="60" required="t" maxlength="120" />
</item>
</replicant>
</item>
<item name="City" rowcontinue="f">
<description>Enter the City in which the Event will be held</description>
<database data-type="VARCHAR(60)" />
<text size="10" required="t" maxlength="60" />
</item>
<item name="State" rowcontinue="f" colspan="0">
<description>Enter mailing address State</description>
<database data-type="CHAR(2)" />
<select required="t">
<option value="PA" label="PA"/>
<option value="VA" label="VA"/>
</select>
</item>
<item name="Zip" rowcontinue="f">
<description>Enter the Zip Code</description>
<database data-type="VARCHAR(10)" />
<text size="10" required="t" maxlength="10" validation-regex="^[0-9][0-9][0-9][0-9][0-9]([-][0-9][0-9][0-9][0-9])?$"/>
</item>
<item name="Purpose of the Event" colspan="3">
<database deploy-column="f" />
<textarea rows="10" cols="40" external-editor="visualformat"/>
</item>
</container>
<script language="javascript">
<![CDATA[
function init()
{
IWEventRegistry.addFormHandler("onSaveValid", onSave);
}
function onSave()
{
IWDCRInfo.setDCRName('bubba');
}
]]>
</script>
</ruleset>
</data-capture-requirements>
Find more posts tagged with
Comments
Migrateduser
Do you have the following in iw.cfg ?
[teamsite_templating]
enable_formapi=true
Make sure to use iwreset -ui after the change.