Data privacy notice

 

When this content is loaded, usage information is transmitted to Vimeo and may be processed there.

 

             

Placeholder substitution (form)

Modified on Mon, 17 Jul, 2023 at 9:09 AM


IPluginFormReplacer


Uses

An implementation of the interface IPluginFormReplacer allows to integrate own replacement logic for the placeholder replacement process of form elements.
The custom implementations are performed before the internal placeholder replacement process of formcycle.
This also makes it possible, for example, to replace system-internal form placeholders with a custom implementation.

When the placeholder replacement is executed, the following pattern is searched for and the placeholder is replaced by the corresponding form value:


Placement of the placeholder replacement plugin for form values in the process chain of FORMCYCLE

[%<own placeholder identifier or name of a form field>%]


When using multiple IPuginFormReplacer implementations, their execution order is not fixed. This may lead to different results when executed multiple times.


The IPluginFormReplacer implementations are basically executed with every form call in the respective application area (system or client plug-in) in which they were installed. It is therefore recommended to first check in the implementation logic whether the IPluginFormReplacer should be executed for the respective form processing. This can be made configurable, for example, by using plugin properties.


Method signatures

The plugin interface IPuginFormReplacer references all methods provided by the base interface IFCPlugin.
and additionally the following plugin-specific method signatures:

IPluginFormReplacerRetVal replace(IPluginFormReplacerParams params) throws FCPluginException 

Transfer value: The IPluginFormReplacerParams type provides access to the following properties: 
  • getPlaceholder() complete string of the placeholder (this includes the markup of the placeholder).
  • getPlaceholderContent() content of the placeholder (without type-specific markup) 
  • getFormversion() the current form version 
  • getFormDataAdapter() the form data adapter, as interface to the concrete form data as well as their description isEncodeForHTML() flag which determines whether the return is to be coded in HTML conformity 
  • getEntityContext() current user context, for example to be able to perform database operations

Return values 
The return value must be of type IPluginFormReplacerRetVal. A reference implementation is provided by the PluginGenericReplacerRetVal class, which is to be initialised with the generated replacement value.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article