A textInput element represents a text input field to gather user input. The RSS specification states that you can use it to specify a search engine box. Or to allow a reader to provide feedback. Most aggregators ignore it.
It contains four elements:
title - The label of the Submit button in the text input area. This value is retrieved with the getTitle method.
$title = $element->getTitle();
description - Explains the text input area. This value is retrieved with the getDescription method.
$description = $element->getDescription();
name - The name of the text object in the text input area. This value is retrieved with the getName method.
$name = $element->getName();
link - The URL of the CGI script that processes text input requests. This value is retrieved with the getLink method.
$link = $element->getLink();
Here's an example of creating a text input box on the fly, using DOMIT! RSS:
case DOMIT_RSS_ELEMENT_TEXTINPUT:
echo '<p><i>textInput: </i></p><p><form
name="textInput" action="' .
$element->getLink() . "\" method=\"post\">\n" .
$element->getDescription() . ":\n" .
'<input type="text" name="' . $element->getName() .
"\">\n" .
'<input type="submit" value="' . $element->getTitle() .
"\">\n" .
'</form>';
break;
|