Skip to content

Commit e240424

Browse files
authored
gpqr-enable-scanner-for-paragraph-fields.php: Added snippet to enable scanner setting for Paragraph Text fields.
1 parent f572929 commit e240424

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
/**
3+
* Gravity Perks // QR Code // Enable Scanner Setting for Paragraph Text fields.
4+
* https://gravitywiz.com/documentation/gravity-forms-qr-code/
5+
*/
6+
add_action( 'gform_editor_js', function() {
7+
?>
8+
<script>
9+
window.gform.addFilter( 'gpqr_is_supported_field', function( isSupported, field ) {
10+
if ( GetInputType( field ) === 'textarea' ) {
11+
isSupported = true;
12+
}
13+
return isSupported;
14+
} );
15+
</script>
16+
<?php
17+
} );

0 commit comments

Comments
 (0)