News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

virtuemart register form if country is china will show another input text

Started by florihana, August 23, 2017, 10:17:21 AM

Previous topic - Next topic

florihana

Using joomla: 3.6
VirtueMart 3.0.18

Hi experts,

Sorry I had to ask but look for the solutions couple hours,  :'(
I would like to if user go to virtuemart registration form, choose country part, like choice China for example
then will show another input: please enter your Chinese address

see the picture


Jumbo!

You need to use some custom Javascript for this. The script will depend on your template's layout and chinese address field id. Post the page link.

florihana

Thank you Jombo,

the problem is I could not find which file in Joomla could add this event,
so far there is vmsite.js file: /components/com_virtuemart/assets/js/vmsite.js

but how to find the country_id data?
In database virtuemart_country_id, china id is 44

so I was thinking doing:
if ( country_id == 44) {
    jQuery('form#adminForm input#address_chinoise_field').show;


but finding country id data seems obstacle

thank you