Account manager page and metadata schema


(Awilliams) #1

Matrix Version: v5.3.4.0
Hi everyone,
I have an Account manager page set up with customised create form layout. I have a metadta schema applied to it that uses two select fields that are required. So basically when a user creates an account the T&Cs have to be checked beforehand.
I’ve used the metadata field keywords and everything is displaying perfectly, but when I try to create an account I’m getting errors for these fields:

Your account was not created. Ensure you have entered a username and password and try again.

trim() expects parameter 1 to be string, array given (first checkbox select field)
The value of restrictions is not valid (second checkbox select field)

I’m finding this all a bit odd because it looks like it’s trying to find a string but it should be a boolean. Are there any types of metadata that can’t be used on an account manager page? I really can’t see why this isn’t working.

Any advice would be welcome.

Thanks

Mandy


(Awilliams) #2

I’ve removed one of the select fields and I’m still getting the same error, so it’s happening with just one select field.

Edit: I’ve gone back to the start and tried using the customised layout with the keyword %details-S_user_details%
which displays nicely on the page, but again i get the same error when I try to create an account, so it’s nothing to do with the metadata schema. Now i’m extra confused. If I don’t customise the layout, i don’t have this problem with creating accounts at all, but I need to customise it to add metadata fields. I’m sure it’s something simple, I just can’t see what.

Okay, my bad, I accidentally set a restriction on the Account manager page required attributes that i thought I’d deleted. I feel such a fool now. But hey ho, if anyone gets that error, they might find this useful… It works perfectly now.

I spoke too soon, I have a problem with required metadata fields now, I have the two checkboxes which are required in my schema, but I can’t seem to make them required fields on the account manager page. So i can submit without consenting to the terms. The ‘Required Attributes’ screen on the account manager page does not have the metadata fields listed, so i’m not sure how else I can make this work.

Okay it’s fixed, thanks Charlie. I hadn’t added the metadata schema to the details screen on the account manager page.