I have some extended fields that I created for users. I am using the Profile snippet from the login package in order to display a specific user’s extended fields.
Example:
[[!Profile? &user=`123`]]
[[- extended fields are now available as placeholders ]]
[[+residence]]
[[+employment]]
etc.
I am using fenom and would like to store the processed values of these placeholders into fenom varialbles.
I’ve discovered that the literal [[+placeholder]] placeholders are being stored in the fenom variables instead of the processed values, which doesn’t allow me to use fenom to manipulate the stored data the way that I need to.
Is there a was to either access the extended fields using fenom initially, or a way to store their processed modx tag values into fenom placeholders?
Thank you! I have implemented this and believe it’s working, however, I’m having an issue with one of the extended fields that holds multiple values. The field is called ethnicities and can hold 1 or more values (or be blank) depending on the user. For example, one user has multiple values stored and it appears like this:
I thought this to be a json array, but when using {$ethnicity|gettype}, it’s actually a string. Is there a way to read this as an array so that I can loop through and format the data as needed. I would like to display the data either in a list or comma-separated on the front end.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.