Skip to content

Instantly share code, notes, and snippets.

@techjewel
Created May 22, 2020 15:35
Show Gist options
  • Select an option

  • Save techjewel/1b87e15e47068d91b4ac0f69ef346052 to your computer and use it in GitHub Desktop.

Select an option

Save techjewel/1b87e15e47068d91b4ac0f69ef346052 to your computer and use it in GitHub Desktop.
Capitalize First Letter of Name Input Field in Fluent Forms
/*
* 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();
@patg84

patg84 commented Jun 15, 2026

Copy link
Copy Markdown

Doesn't work in conversational mode. There's an actual warning on the JS input page stating this. Thanks anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment