Firstname &Lastname Prefill Profile

Is there any way to prefill the firstname and lastname field in commerce checkout for registered users like all the other fields like address, country, zipcode, email etc?

Sorry for not responding to this sooner.

As MODX users don’t have a first and last name, no, that’s not currently possible with the UserProfileAddress module. The built-in stored address of course do support that.

Am I correct in assuming you’re storing a first and last name in the extended field on the profile? If so, what are those named as?

Do you have the first and last name in the “fullname” field or is that something else?

I’ve logged a feature request and that additional information would be useful to add. :slight_smile:

Hi Mark,
thanx for answering on this. My fields are named “firstname” and “lastname”.

I solved this by adding a javascript snippet thats fires on keydown on both of this fields and copys the input to a hidden field named “fullname”. And i also added a MODX-Snippet that splits the fullname back into firstname and lastname on load.

Commerce also supports swapping out the first and last name fields with a single fullname field, so you don’t need that workaround if you replace the fields in the template.

Thanks for the details!