powermail icon indicating copy to clipboard operation
powermail copied to clipboard

FEATURE: Add autocomplete attribute to form fields

Open markusguenther opened this issue 4 years ago • 14 comments

For accessibility reasons form elements should have autocomplete fields. To have just autocomplete with value on or off does not bring much value for the user.

So form editors should be able to define the field content type so that the auto complete knows which data could be used.

Screenshot 2020-10-27 at 15 22 12

Screenshot 2020-10-27 at 15 24 12

markusguenther avatar Oct 27 '20 14:10 markusguenther

~~Ah ok added that for version 7.4 ... so need to rebase that for the current develop branch. I also need to add more german labels.~~

markusguenther avatar Oct 27 '20 14:10 markusguenther

Wow, great work!

From a UI standpoint it would be a bit nicer if the name/telephone/address/birthday/cc-expiry parts were in a kind of submenu or otherwise visually separated.

I don't undertstand why name is duplicated in the CC section. IMHO this is confusing.

Nitpick: There is no way to select home/work/fax/pager for a phone number. Nor is there a way to mark a field belonging to a shipping or delivery address.

masi avatar Nov 12 '20 14:11 masi

Thanks for the feedback... right now I just checked what kind of autocomplete attributes are defined by the w3c and tried to group them.

Need to check if your requests are possible. T

markusguenther avatar Nov 12 '20 14:11 markusguenther

https://www.w3.org/TR/html52/sec-forms.html#sec-autofill

It's rarely referenced in tutorials, but the autocomplete attribute may be made of more than one token.

masi avatar Nov 12 '20 16:11 masi

Will this be merged? That is a great feature!

ursbraem avatar Sep 01 '21 13:09 ursbraem

I also have a feature request from a customer for the autocomplete field.

It would be great, if this could be merged.

blueamerican avatar Jun 15 '22 06:06 blueamerican

@einpraegsam Still nothing? What's needed to get this into production?

emileblume avatar Nov 07 '23 11:11 emileblume

We have an extension with various tweaks to powermail, powermail_tools. https://bitbucket.org/stubr/powermail_tools It has autocomplete, and other very helpful features, check out the readme. We haven't officially open sourced it, but maybe that's a good moment?

ursbraem avatar Nov 07 '23 12:11 ursbraem

We have an extension with various tweaks to powermail, powermail_tools. https://bitbucket.org/stubr/powermail_tools It has autocomplete, and other very helpful features, check out the readme. We haven't officially open sourced it, but maybe that's a good moment?

The addition of a standard solution for the autocomplete is long overdue and I really don't understand why Markus' feature is being ignored for so long. However I don't want to have to rely on additional extensions, especially since I have a work-around.

emileblume avatar Nov 07 '23 12:11 emileblume

You're welcome :-)

ursbraem avatar Nov 07 '23 13:11 ursbraem

@emileblume

However I don't want to have to rely on additional extensions, especially since I have a work-around.

What work-around?

sypets avatar Nov 08 '23 06:11 sypets

@sypets We never use the Placeholder field so editors get instructions to add the proper value for the autocomplete here. In the Fluid partial Form > Field > Input I use this as the form.textfield tag.

<f:form.textfield type="{vh:validation.fieldTypeFromValidation(field:field)}" property="{field.marker}" value="{vh:misc.prefillField(field:field, mail:mail)}" class="powermail_input {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}" additionalAttributes="{vh:Validation.ValidationDataAttribute(field:field, additionalAttributes:'{autocomplete:\'{field.placeholder}\'}')}" id="powermail_field_{field.marker}" />

emileblume avatar Nov 08 '23 07:11 emileblume