Replace input text spaces to “-” in a hidden field
-
Hello there,
I’ve created a form linked to a google sheet which is “reposted” on a discord server through ifttt similar.
I wanted to know if is it possible to replace spaces from a text input into a hidden field, ie
Input text {text-2), “I am an example”, written by the user compiling the form, become “I-am-an-example” in hidden field {hidden-1}.I’m already using a replacing custom mark in other forms, I thought that, maybe, this can be the solution also for this kind of request?
The mu plugin that I’m using is thisadd_filter( 'forminator_field_markup', function( $html ) { $nickname = get_user_meta( wp_get_current_user()->ID, 'CustomMeta', true ); $html = str_replace( '%nickname%', $nickname, $html ); return $html; }, 99 );
I’m using %nickname% as custom mark on a hidden field.
Is it affordable through using mu-plugin like the example up here?
- The topic ‘Replace input text spaces to “-” in a hidden field’ is closed to new replies.