Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

City is still required


Guest

Recommended Posts

Posted

Becasue australia is so small we do not use city in our addresses. I have changes the minimim number for letters require to 0 but when submitting the form and error message still occurs saying field required a minimum of 0 letters is required.

 

How do I remove a required field (I would be happy to remove it all together)

Posted

Hi Josie

 

I'm in Australia too!

 

After fiddling with the city field for ages, I finally worked out a solution - however I'm not sure if this will affect anything further down the track...

 

What I did was open the catalog/create_account.php file in Dreamweaver, went into Design Mode, Deleted the entire table row where the City field was, then went back into the code.

 

On line 117 was this:

 

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {

$error = true;

 

 

I changed the $error to FALSE so that it looked like this:

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {

$error = false;

 

 

This appears to be working for me. I haven't tested it completely so if anyone works out that there are problems with this please post a reply!

 

Hope this helps.

Posted
Hi Josie

 

I'm in Australia too!

 

After fiddling with the city field for ages, I finally worked out a solution - however I'm not sure if this will affect anything further down the track...

 

What I did was open the catalog/create_account.php file in Dreamweaver, went into Design Mode, Deleted the entire table row where the City field was, then went back into the code.

 

On line 117 was this:

 

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {

    $error = true;

I changed the $error to FALSE so that it looked like this:

if (strlen($city) < ENTRY_CITY_MIN_LENGTH) {

    $error = false;

This appears to be working for me. I haven't tested it completely so if anyone works out that there are problems with this please post a reply!

 

Hope this helps.

 

I have made this change but it make no difference the form still asks for the city when submitting form

Posted
I have made this change but it make no difference the form still asks for the city when submitting form

 

Do you mean the text field and title are still there? Or is it asking you for the city after you have hit submit?

Posted
Do you mean the text field and title are still there? Or is it asking you for the city after you have hit submit?

 

It is asking for city after you hit submit

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...