Hi @gillesgagnon
Actually, I just got a response. In this case, however, we can’t “lift restrictions” easily, I’m afraid, so a different workaround can be used.
You would need to add this code to the site first as MU plugin:
<?php
add_filter( 'forminator_field_text_markup', 'wpmudev_formi_render_anchor_textarea', 10, 2 );
function wpmudev_formi_render_anchor_textarea( $html, $field ) {
if ( $field['element_id'] == 'textarea-1' ) {
if ( strpos( $html, '{wpmudev_anchor}' ) !== false ) {
$html = str_replace( '{wpmudev_anchor}', '<a href="https://mylocal.local/">Here</a>', $html );
}
}
return $html;
}
– create an empty file with a .php extension (e.g. forminator-textara-default.php)
– paste code into it
– and make two changes in the code
a) in this line
if ( $field['element_id'] == 'textarea-1' ) {
replace textarea-1 if needed with your textarea field ID
b) and in this line
$html = str_replace( '{wpmudev_anchor}', '<a href="https://mylocal.local/">Here</a>', $html );
replace the
<a href="https://mylocal.local/">Here</a>
part with your own A tag code.
– save the file and upload it to the “/wp-content/mu-plugins” folder of your site’s WordPress installation
Next step is to add following as default value of the textarea field
{wpmudev_anchor}
Save the form and that’s it. It will use the link there.
Kind regards,
Adam