GrazrScript Tutorial

Field substitution

All of the examples so far have substituted the value of form fields in the URLs of RSS feeds, but GrazrScript offers other options. You can also perform substitution in the URLs for Web pages and OPML files using the link and include nodes of OPML. All of the OPML node types include a text attribute, and substitution can be done there as well. If you are unfamiliar with OPML syntax, you can get more details in the Grazr OPML primer.

http://docs.grazr.com/script/tutorial/substitute.xml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0" xmlns:grazr="http://docs.grazr.com/script/spec/1.0">
<head>
<title>Field Substitution</title>
</head>
<body>
<grazr:form name="subform">
Value to be substituted <input type="text" name="formfield" />
<input type="submit" value="Submit" />
</grazr:form>

<grazr:formtemplate name="subform">
<outline text="%formfield% in text node" />
<outline text="%formfield% in include node URL" type="include"
url="http://tagjag.com/all/%formfield%/opml" />
<outline text="%formfield% in link node URL" type="link"
url="http://news.google.com/news?q=%formfield%" />
<outline text="%formfield% in RSS node URL" type="rss"
xmlUrl="http://news.google.com/news?q=%formfield%&output=rss" />
</grazr:formtemplate>

<grazr:formresult name="subform" text="Substitution results:" />

</body>
</opml>

Creating your first applicationField validation