I created several custom user profile fields, including Full Name (a plain text field) and County (a List (text) field). They are displayed on the
/user/#/edit form. I want to display these fields (and several others) in a different form I am generating via custom module code.
Question: Is it possible to extract the definition of a field, including its label, default value, and, in the case of County, the list of allowed values?
I imagine a field is an entity of some kind that can be extracted, but after much reading, I haven't seen how. I'm likely just not using the right terminology.
I could easily hard-code replicas of these fields in the PHP+HTML form, but I want to maintain the label, default value, list of allowable values, etc. for them in just one place--as part of the user profile. Thus, I want to extract their definitions and output them into the form I build.