Write your names exactly as the passport prints them.
{{ fm.text("surname", "Surname", f.surname, err=errors.surname, req=true, auto="family-name") }}
{{ fm.text("first_name", "First name", f.first_name, err=errors.first_name, req=true, auto="given-name") }}
{{ fm.text("middle_name", "Middle names", f.middle_name, err=errors.middle_name, auto="additional-name") }}
{{ fm.select("title", "Title", f.title, titles, err=errors.title, blank="Choose") }}
{{ fm.select("sex", "Sex", f.sex, sexes, err=errors.sex, blank="Choose") }}
{{ fm.text("date_of_birth", "Date of birth", f.date_of_birth, err=errors.date_of_birth, type="date", auto="bday") }}
{{ fm.text("place_of_birth", "Place of birth", f.place_of_birth, err=errors.place_of_birth, hint="As in the passport.") }}
{{ fm.select("nationality", "Nationality", f.nationality, countries, err=errors.nationality, blank="Choose a country") }}
{{ fm.text("occupation", "Occupation", f.occupation, err=errors.occupation, cls="wide") }}