Remote searchform: how to link a searchform and a lister on different plugins/pages

Use this technique when your searchform and your lister are in two different plugins, on 2 different pages, or on the same page.

 

Note: this feature is available only in Formidable revision 2.0.263 and above. If you're not sure about the version you use, check in the TYPO3 extension manager.

First, the sender part

Define a searchform as usual, You have to add <remote mode="sender" />. By doing this, you tell the searchform not to bind to any datasource, and so you may not define any <datasource> tag.

 

In the <form> tag, you'll have to specify the target page using <action>, if your lister is not in the current page.

 

 

Second, the receiver

You then have to define the xml that will hold the lister.

 

Define your receiver searchform by adding <remote mode="receiver">. Then specify the senderFormId and the senderAbsName, respectively the form-id of the sender XML, and the absolute name of the sender searchform.

 

For the receiver searchform to be able to handle incoming data from the sender, you have to provide the same searchfields as in sender; to achieve this easily, we decided here to use an includeXml tag, with an xpath to cut out only the /childs tag inside the sender searchform.

 

One more thing: by default, receiver searchform wont display anything. To change this, you have to specify invisible=false in the <remote> tag.