Created
May 22, 2020 15:35
-
-
Save techjewel/1b87e15e47068d91b4ac0f69ef346052 to your computer and use it in GitHub Desktop.
Capitalize First Letter of Name Input Field in Fluent Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add this js snippet in Form's JS box | |
*/ | |
function capitalizeFLetter() { | |
var $input = $form.find('.ff-name-field-wrapper').find('input'); | |
$input.on('blur', function() { | |
var string = $(this).val(); | |
if(string) { | |
string = string[0].toUpperCase() + string.slice(1); | |
$(this).val(string); | |
} | |
}); | |
} | |
capitalizeFLetter(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment