Storing information from a text metadata field from an account manager page


(Awilliams) #1

**Matrix Version:**5.3.4.0

I’m looking at adding a metadata text field to the form used to create accounts from the account manager asset, but ideally we need to capture the details entered in this field (preferably linked to the user account created). The user accounts only seem to store username, email and password. Is there any way to add fields to this? If not does anyone know a way this could be achieved?

I did think about nesting a form into the page but I know that might be messy.

Thanks

Mandy

Is it possible to use a trigger for this at all. I’ve been looking through the triggers to see if I can create one and the triggers manual says:

‘After Asset Built
If this event is selected, the Trigger will be fired when an asset is finalised after creation from an Asset Builder or Account Manager Page. Finalised assets are assets that have any required metadata values or paint layouts configured. For example, if a user creates a Standard Page asset using an Asset Builder, configuring the information for any required metadata values, this Trigger will be fired.’

So is it possible to create a trigger on the Account Manager page that fires when a user accout is created and somehow do something useful with the reuired metadata fields?

It’s a little frustrationg that you can’t add the metadata fields you create from the account manager page to the email verification part of the Account Manager, only the name, username and password are available as keywords. :disappointed:


(Anthony Ponomarenko) #2

Howdy,

After re-reading your post im not sure if the below is answering your question but i thought id post it anyway just in case.


Theres a few things you have to do here.

In the Account Manager Page Details Screen, you can apply the Metadata Schema on create of the User Asset - look for the setting ‘Metadata Schemas to Apply’ - select the Schema you want to be applied to the user.

In the ‘Advanced Settings’ section you can select the ‘Create Form Customisation’ option. On commit a new Simple Edit Layout will be created under the Account Manager. This is where you can define what you want displayed on screen when the user is creating the account.

To get you started add in the following keywords to the User Create Form Layout:
%details-S_user_details% – this will display all the available fields to enter for the user asset
%metadata-F_XXXX% – replace XXXX with the asset ID of the Metadata field, this will show an input field for the metadata field.
%commit_button% – this displays the commit button

Now on create you can capture the value of the metadata on the user asset itself.

You can go more granular in the user details as well, checkout the list of specific keywords you can get to from the link at the top of the Simple Edit Layout Contents page.


(Awilliams) #3

Thanks for replying, I’ve managed to customise the create form and add the metadata fields and it all writes to the page beautifully, it’s the capturing the values for the metadata fields on create and storing them that I can’t seem to get my head around. I’ve created a few test user accounts but the only details they store are the username, password and email, not the extra required metadata fields I added, unless I’m not seeing something obvious, which wouldn’t be the first time.

Basically what I’m trying to do is set up a secure area not usually publicly accessible, where a user has to sign up for an account, but we need to store some personal details as well, like address. So I have the usual username, email and password fields, and then a couple of check boxes to say ‘I’ve read the Terms and conditions’ and then an address field that I need to be able to link to the user account.

It’s the first time I’ve set up an Account Manager page so I’m kind of learning as I go along and stumbling over a few hurdles…


#4

You won’t see the additional fields in the User Details section of the Details screen, but as long as you’ve applied the Metadata Schema to the user asset the fields should appear on the Metadata screen.


(Awilliams) #5

Ah, thank you so much, I just looked at the metadata in the pending accounts part and it was showing as empty for my test accounts, but then I realised I hadn’t applied the schema to the usergroup where they go after validation.

You guys are ace, thank you so much.


(Awilliams) #6

Hi again, the log out %logout_form% keyword doesn’t seem to work on the user logged in form layout. It just reloads the url with the user still logged in.

I’ve tried hard coding it and that doesn’t seem to make any difference. There are two actions on the page, one to update user details which works perfectly fine, but the logout doesn’t.


(Anthony Ponomarenko) #7

The logout form will only show when the user is logged out


(Bart Banda) #8

Do you mean “when the user is logged in”?

Not sure what part isn’t working for you @awilliams but the manual hardcoded logout URL can be done by just accessing the current page with ?SQ_ACTION=logout appended to the URL, can you try that?


(Awilliams) #9

I have the ‘not logged in’ format working, the ‘logged in format’ works fine, that’s where you end up once logged in, then on that page I have a part where a user can edit their details, that works perfectly, but I have tried to put the logout keyword on this page so that a user can logout. I’ll try your suggestion Bart when I get the locks back on the page. It’s not imperitive that I get this working, but it just frustrates me when I can’t get everything working with a vague understanding of how it’s all put together :wink: