Author Topic: Extra field adress form  (Read 1243 times)

Offline mgeene

  • Posts: 148
Extra field adress form
« on: May 22, 2016, 07:33:59 PM »

Is it possible to have an extra field to add to the address form?
I want the adress and housenumber not in one field but in 2 fields.

Does anyone know the solution?

Thanks for your reply.

Offline Gast

  • Posts: 5920
Re: Extra field adress form
« Reply #1 on: May 23, 2016, 03:19:26 PM »
of course is it possible, but a lot of work and (maybe) not better in usability for the customers, because, one insert more == one place for errors more
in my eyes not possible to split this adress info into two parts for a good working sanitize (in the sense of: allowed chars in housenumber: only numeric chards).
 i remember to some curious adresses in berlin or in Wien, maybe Römergasse Haus 3 Tür 2 or Moskauerstraße 22 Hinterhof 3 Tür 58
for the customer very easy, all this is my adress, but if you look into the code... what is street, what is house-number?
okay, i need a new textfield, but how can i check this? if somebody write a adress like this all together im my street field, the formularcheck doesnt work, because, Housenumber is empty. So maybe, its better to give the actual adressform a better description for the field (example: "your Street and Housenumber" instead of the simple "street"
and maybe, if needed, a tooltip with a longer description like this simple CSS-Solution here

to add this new field, you need...
- new field in database
- add new field in formular
- add new field in formularcheck and save
- add the new field to your adressblock and change the arrays to build and read this block
- change any templates to show this new field in different places like adress form, payment method etc
- change all payment methods to use this new field

all together not realy difficult for an expert, but complexe to search all the places in the module files

Offline mgeene

  • Posts: 148
Re: Extra field adress form
« Reply #2 on: May 24, 2016, 07:43:50 PM »
Thanks for your reply Jacobi22,

OK thats a lot of work for me, im not an expert ;-)