By Mohammad Dourou on Friday, 01 June 2018
Posted in General Issues
Replies 2
Likes 0
Views 686
Votes 0
I had a client who was able to submit this form without having to select a province (even though it was a required field), so now they are not paying taxes http://prntscr.com/jpfgu2

This field was originally a list of countries, but we customized it and changed it to be a list of Provinces, and each province has a different sales tax.

Questions:
1) I did a quick test myself, and I was able to submit form with "Please select" option chosen. How can I make it not be a valid option?
2) If I want to remove the "Please select" option, and have a default value, how do I do that? I want my default value to be "Ontario".
May i know which PHP file you customised?

Is it possible provide us with your FTP access so we can better have a look?
·
Friday, 01 June 2018 17:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mohammad,

I have tried at my localend with basic tax app , i am not able to submit the form without selecting province.
Let me know which file you have customize.

If I want to remove the "Please select" option, and have a default value, how do I do that? I want my default value to be "Ontario".
To remove Please select option , Go to root/plugins/payplans/basictax/basictax/tmpl_bs3/invoiceconfirm.php, find below mentioned code.

<?php echo PayplansHtml::_('country.edit', 'app_basictax_country_id', $country, array('option_none'=>true, 'style' => 'class="input-medium"')); ?>


Replace with

<?php echo PayplansHtml::_('country.edit', 'app_basictax_country_id', $country, array('style' => 'class="input-medium"')); ?>


To add default country to Ontario , need to do the changes in below mentioned file
root/plugins/payplans/basictax/basictax.php you need to add the the below mentioned code before line number 102 ($this->_assign('country', $country)

if (!$country) {
$country = 4;
}


Replace 4 with country id which you want to set.
Update me.
·
Friday, 01 June 2018 18:43
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post