AutoValidator and uploadunit

silence

Well-known member
Ok so I have an admin template as so:

Code:
<xen:form action="{xen:adminlink 'users/avatar-upload', $user}" upload="true">
    <xen:uploadunit label="{xen:phrase upload_avatar}:" name="avatar" />

    <xen:submitunit save="{xen:phrase modify_avatar}" />
</xen:form>

That works just fine. Now if you add to xen:form
Code:
class="AutoValidator"
You get this error:
Code:
The field 'avatar' was not recognised.

Alright fine. Now if I try to add to xen:uploadunit
Code:
class="OptOut"
it still spits out avatar as false.

Will I not be able to use an upload unit with the autovalidation feature?

Thanks!
 
The particular error you're getting sounds like you're attempting to set a value on a field using the DataWriter that doesn't exist.

It is quite likely, though, that file uploads in this way are unlikely to work unless you have additional code to support it, hence I've moved this from bugs.
 
It is quite likely, though, that file uploads in this way are unlikely to work unless you have additional code to support it, hence I've moved this from bugs.
This is correct. AutoValidators don't support uploads.
 
It's probably somewhat unlikely to change, at least in a short enough term to be relevant to something you're developing right now.
 
Top Bottom