APIs on label and richtext output handling

Filter: ipt_uif_richtext

This filter is used to modify the richtext contents of element descriptions.

Filter Uses

Accepts one argument, the HTML string (rich text).

[php]
/**
* Modifies RichText Elements inside all eForm output
*
* @param string $text Original text/html
*
* @return string
*/
function modify_fsqm_richtext( $text ) {
// Perform some action to the text
$text = str_replace( ‘google’, ‘<a href="http://google.com">Go Google</a>’, $text );
return $text;
}
add_filter( ‘ipt_uif_richtext’, ‘modify_fsqm_richtext’, 10, 1 );
[/php]

Source

Located in multiple sources

Filter: ipt_uif_label

Used to modify the output of form elements’ labels.

Filter Uses

Accepts one parameter, the label HTML (string).

[php]
/**
* Modifies labels inside all fsqm elements
*
* @param string $text The label HTML
*
* @return string
*/
function modify_fsqm_labels( $text ) {
// Perform some action to the text
if ( is_admin() ) {
return $text;
}

$text = '&lt;span class=&quot;my_label&quot;&gt;' . $text . '&lt;/span&gt;';
return $text;

}
add_filter( ‘ipt_uif_label’, ‘modify_fsqm_labels’, 99, 1 );
[/php]

Source

Located in multiple sources