Are you paying more taxes than you have to?
Whether this is your first time around doing taxes as a fee-for-service physician, or you have a trustworthy accountant you’ve worked with for years, having a financial plan helps ensure you’re staying on top of your taxes by contributing to the right accounts while keeping accurate documentation.
In October, RBC Ventures acquired Dr. Bill so, while you’re probably used to us always talking about how to maximize your claims and earn more, today we’d like to help you keep more of what you do earn by making sure you have a financial strategy when it comes to taxes.
In order to do this correctly, we sat down with Prashant Patel and Allison Marshall, Vice Presidents of High Net Worth Planning Services and Financial Advisory Support from RBC Wealth Management.
We asked them 10 tax-related questions to help make you’re aware of any financial opportunities you might benefit from. Find their answers below and use this Q&A as a quick outline to make sure you have a viable tax plan for years to come.
Tax Planning Questions for Canadian Physicians
-
When should a physician incorporate and what are the benefits of incorporating or not?
-
There were recent changes to the income splitting rules, can you explain those changes?
-
What’s the best way a physician can reduce their taxable income?
-
What are some good tax strategies you’d recommend to Canadian physicians
-
Is there any advice or roadblocks you would warn physicians about?
1. What type of tax return do physicians need to file?
If you’re not incorporated, then you’re working as a sole proprietor (meaning you’re a single owner, or a partner of a partnership, and are responsible for all liabilities). In this case, you’re taxed personally and need to file a T1 Income Tax and Benefit Return.
If you are incorporated, you will need to file T2 Corporation Income Tax Return, as well as a T1 Income Tax and Benefit Return (one for your company and one for salary and/or dividends paid to you from your company).
The corporation’s taxable income (after deducting salary and other allowable expenses) is taxed at the corporate level at corporate rates. The corporation’s after-tax income can then be distributed to yourself as a taxable dividend. Generally speaking, the intent of the Canadian tax system is that these two taxes add up to the same amount of taxes you’d pay if taxed personally.
If you’re part of a partnership, then you need to file a T5013 Partnership Return. Lastly, if there is a family trust you’ll need to file a T3.
2. What is Taxable and Non-taxable Income?
All income is typically taxable other than TFSA (A tax-free savings account), life insurance, or principal residence exemption. Principal residence exemption is an income tax benefit that gives you an exemption from tax on any capital gains earned when you sell your home.
3. When should a physician incorporate and what are the benefits of incorporating or not?
Incorporation depends on a lot on personal circumstances and various factors. This isn’t a decision you make lightly and it isn’t for everyone. If you’re considering incorporating we suggest running it by your accountant or your financial advisor first. Typically, the best time to incorporate is when the advantages of incorporation, such as limitation of liability and deferral of taxes, is greater than the additional cost of being incorporated.
There are a number of advantages to incorporating, many specific to taxes. A significant advantage of running your practice through a corporation is the ability to defer taxes. Business income earned within a corporation is taxed at two levels – once at the corporate level and then again at the personal level when your income is distributed.
By incorporating and earning business income within your corporation, you can defer personal tax on the after-tax business income until the time you withdraw it from the corporation. This means that if you don’t need to take any money out of the corporation then you can defer the payment of the second layer of taxes. Generally, the longer you can leave the funds in your corporation, the greater the deferral advantage will be.
This tax deferral is available because business income earned within a corporation may be taxed at lower corporate tax rates than business income earned while operating as a sole proprietor. This is because corporate business income is generally taxed at lower rates, around 12.5%, than business income earned personally, around 53.5% (rates vary depending on what province you’re in).
Active and Passive Income
There are generally two types of income when it comes to your corporation; active and passive. Active business income is generally any income earned from operations, minus overhead and salary. Passive income is considered any income that is earned in your corporation from investments (interest, dividends, capital gains, mutual fund income and rental real-estate income). Generally, active business income has a lower tax rate than passive income.
Small Business Deduction
Business income earned in a corporation may be considered active business income and subject to a federal corporate tax rate of 15%, plus the applicable provincial rate.
However, if your corporation is a Canadian controlled private corporation throughout the year, (i.e. it’s controlled by Canadian residents and not by a public corporation or non-residents) then your corporation may benefit from the small business deduction (SBD) which lowers the federal tax rate to 9% on the first $500,000 of active business income.
As a result of lower corporate tax rates on active business income, you then may have more after-tax business income to invest inside your corporation.
For example, assume that your practice generates $500,000 of taxable active business income during 2019 and you require $180,000 of this amount to fund your life (mortgage payments, groceries, day-to-day living, etc.). Let’s also say that your individual tax rate is 40% and the combined corporate tax rate on active business income eligible for the small business deduction (SBD) is 15%.
Your corporation would pay a salary of $300,000 (which, assuming an effective personal tax rate of 40%, results in an after-tax income of $180,000) to fund your personal expenses.
The excess income would be subject to tax in the corporation at the small business rate. The corporate after-tax income would be retained within the corporation and be available for passive investments. Here’s a chart showing the difference of being incorporated vs. a sole proprietor and the possible benefit of the SBD:
Sole Proprietor | Corporation | |
---|---|---|
Corporate Income | – | $500,000 |
Less: Salary | – | (-$300,000) |
– | $200,000 | |
Less: Corporate Tax (15%) | – | (-$30,000) |
Funds Available for Reinvestment | – | $170,000 |
Personal Income (practice or salary) | $500,000 | $300,000 |
Less: Personal tax (40%) | (-$200,000) (*) | (-$120,000) |
Less: Personal Expenses (40%) | (-$180,000) | (-$180,000) |
Funds Available for Reinvestment | $120,000 | Nil |
(*) Personal tax rate may be higher than 40% as a sole proprietor since all your personal income is subject to personal taxes.
Depending on the rules of the regulatory body governing professional corporations in your province of residency another benefit of incorporating might be the opportunity to split income with family members – which can lower the amount you pay in taxes. However, the ability to split income has recently changed and there are more limitations to who and when you can split your income (for more on the income splitting changes see below).
Disadvantages of Incorporating
Besides the tax-advantages above, incorporating is not for everyone and it depends at what stage of your career you’re in. If you incorporate, there may be an increase in complexity and cost.
A corporation is a separate legal entity; therefore the business structure is more complex. You’ll need to abide by certain corporate formalities and you may be subject to greater regulation and compliance than you would as a sole proprietorship.
If your corporation suffers any business losses then these losses can only be used by the corporation against the corporation’s income and not against your personal income. However, if you were a sole proprietor, those losses could be used to offset other sources of income.
There is also a potential for double taxation on death. First, you are taxed on the capital gain arising from the deemed disposition of your shares on death. Then, if your corporation is wound up or makes distributions to its shareholders, a second level of tax may be triggered. That being said, there are certain post-mortem tax planning strategies that can be used to mitigate this double tax exposure if this happens. It’s best to speak to your financial advisor when incorporating to make sure you implement a strategy that works for you.
You’ll also need to pay additional professional fees in order to prepare corporate tax returns.
4. There were recent changes to the income splitting rules, can you explain what those changes are?
In the past, a physician with a corporation was able to use their retained earnings and pay out dividends to lower-income adult family members to take advantage of their lower marginal tax rate (they would be taxed based on the tax bracket they fit into).
The ability to split income with family members has been reduced by recent changes to the Tax on Split Income rules (TOSI).
Now, unless certain exemptions apply, no matter what tax bracket your family member is in, the income paid from your professional corporation is taxed at the highest tax rate. In addition, the family member who receives split income loses the ability to claim personal tax credits on the split income, such as the basic personal tax credit (non-refundable tax credits that help reduce the tax on the income you’re required to pay tax on).
Basically, if you’re a Canadian physician then income splitting for tax purposes is now extremely limited.
There are certain exclusions to TOSI, which differ depending on the age of the individual receiving the income. The exclusions mainly rely on whether the family member is significantly involved in your business or owns a certain portion of the votes and value of your corporation’s shares. These exclusions are more restrictive for professional corporations. For example, generally, family members cannot be voting shareholders of professional medical corporations.
The new TOSI rules apply to any type of income received from a private corporation (i.e., interest, dividends as well as certain capital gains), but they do not always apply to salaries or bonuses. For example, a salary would not be subject to TOSI but would have to be reasonable in the circumstances, and be based on the work performed by the family member.
If you’re not sure if the income your corporation is paying falls under the new TOSI rules reach out to your tax advisor to double-check.
5. There were also changes to Passive investment income taxation, what do physicians need to know for 2020?
In 2018 the government introduced changes that limit a private corporation’s access to the federal small business limit in a year. The federal small business limit is reduced on a straight-line basis when your corporation earns between $50,000 and $150,000 of passive investment income annually.
The business limit is reduced by $5 for every $1 of passive investment income earned between the $50,000 to $150,000 threshold. The business limit will be eliminated if your corporation earns more than $150,000 of passive investment income in a year.
Basically, this means if you earn more than $50,000 of passive investment income, expect to see a reduction in the $500,000 small business deduction (which allows you to use the smaller tax rate). So, as your passive income increases, you’ll see a decrease in the amount of your active business income that can be taxed at the $500,000 small business tax rate.
Reminder: Not all provinces follow this federal tax change and it is important to check with your province of residence if the provincial business limit for a corporation will be reduced by income from passive investments.
Ultimately, if you’re incorporated, it’s best to work closely with a financial advisor so you can create a strategy that ensures the passive investment income earned in your corporation does not grind down your business limit. Of course, your risk tolerance and investment merits also need to be considered when creating an appropriate investment strategy.
Note for Ontario Physicians: Since the Ontario federal government didn’t follow the passive investment change, some accountants recommend walking into the grind; which just means you would continue to keep your passive income investment in your corporation and let it accumulate.
6. How should physicians calculate their annual receipts?
Ideally, if you’re a physician you should use a software program to keep track of receipts. This will reduce the chance of calculation errors and allow you to stay organized.
How to Get your Billing Tax Report
At Dr. Bill we’ve built a reporting section where you can get a tax report of your medical claims. Simply log into your Dr. Bill account, click on reports, then income and expenses. Put in the date (ex. January 1st, 2019 – December 31st, 2019) and click generate. You’ll see accounts receivables and write-offs. Print it off and give it to your accountant.
7. Can you speak a bit about RRSP Contributions and general advice for physicians in what else they should contribute to?
If you’re a sole proprietor you can use RRSP contributions to reduce your taxable income. This is a very tax-efficient way to save for retirement as it allows you to shelter your investment earnings from tax while lowering your annual taxable income.
When you retire and you’re ready to remove your money from your RRSP account, you may be taxed at a lower marginal tax rate, if you’re in a lower tax bracket when you retire compared to today.
If you’re incorporated and paying yourself a salary, you would generate RRSP contribution room, as this is considered to be ‘earned income’, and thus you’d also be able to contribute to an RRSP. Again, this is a great way to reduce your taxable income while saving for retirement.
You could also set up an Individual Pension Plan (IPP). An IPP is a defined benefit pension plan that a corporation can establish. In certain situations, an IPP can provide greater annual contribution room than an RRSP. Contributions to an IPP provide an immediate tax deduction to the company and are exempt from payroll and healthcare taxes. Plus, IPP retirement benefits can be split with your spouse which would lower your family’s overall tax bill. IPPs are also generally creditor protected.
If you’re incorporated you can pay yourself with a mix of salary and dividends. Rather than paying yourself a salary, in certain circumstances, it may make sense if you pay a dividend from your after-tax corporate business income to cover personal living expenses and then invest the remaining funds in the corporation. The remaining after-tax business income, plus after-tax investment income, could be paid out as dividends in a future year to fund your retirement spending. It’s always best to sit down with a financial advisor to create a strategy best suited for you and your practice.
Other contribution considerations:
-
TFSA for all adult family members
-
RESP for minor children
-
Consider tax-exempt life insurance
-
Set up a charitable foundation
8. What’s the best way a physician can reduce their taxable income?
If you’re a sole proprietor, then consider the following strategies:
-
Max out your RRSP contributions
For example, if you had any contribution room carried forward from previous years, make sure you use in order to accumulate growth and lower your taxable income.
-
Purchase flow-through investments
By purchasing flow-through investments you can receive tax deductions through shares. Consider the overall quality of the investment before buying.
-
Make charitable donations if you have charitable intentions
-
Claim Capital Cost Allowance (CCA) on equipment
-
Deduct any discretionary expenses
If you’re incorporated, then consider the following strategies:
-
Contribute to an IPP (see above for more details)
-
Tax efficient investments (e.g. investing in life insurance)
-
Income splitting if not subject to TOSI (see above for more details)
Claim Capital Cost Allowance (CCA) on equipment -
Deduct any discretionary expenses
9. What are some good tax strategies you’d recommend to Canadian physicians?
If you’re looking for tax strategies then ask your financial advisor about:
-
IPP, RSP, TFSA
-
Tax-exempt life insurance
-
Income splitting strategies (subject to TOSI rules)
-
Donating stock in-kind
-
Multiply small business deduction (if permitted under tax rules)
-
Incorporating (only if you’re earning a significant income)
-
Estate planning (powers of attorney, Wills/multiple Wills if incorporated)
10. Is there any advice or roadblocks you would warn physicians about?
Having a team of professionals that are experts in their area will help guide you throughout your career as well as educate you on the business side of things. This goes from administration help, to billing, all the way to financial and wealth management. For example, in our experience, administration practices are very time-consuming and many physicians are time-starved. There’s also a very high cost on medical equipment, but only modest growth in government funding, which places an increased importance on practice financial management.
Building a team of professionals will help you cover gaps in your own expertise, make smarter decisions, protect yourself and your family, and plan for the future. If you’re a new physician or a resident check out our complete guide on wealth management basics.
Need help with your financial planning?
RBC has a team of 500 Healthcare Specialists dedicated to providing support, guidance, and value when it comes to your finances. From securing loans to financial planning, they can assist you with your financial needs every step of the way through residency, fellowship, and independent practice.
Find an RBC Healthcare Specialist
Theme Name: Dr. Bill RBC Healthcare Form, Blog Page
Author: Sideways Design
Version: 1.12d
*/
#block-yui_3_17_2_1_1580218461582_42590, #block-yui_3_17_2_1_1576786890700_32723 {
visibility:hidden!important;
position:fixed!important;
top:0!important;
left:-100000px!important;
}
.drb_rbchealthcare--form-content:before {
position: absolute;
content:'';
background-color: #f1f1f1;
display:block;
top:0;
left:50%;
min-width:100vw;
height:100%;
margin-left: -50vw;
}
.drb_rbchealthcare--form-content .form-item .option-group {
display:block;
}
.drb_rbchealthcare--form-content .form-item .option-group .option {
display:inline-block!important;
}
.drb_rbchealthcare--form-content .form-item .option-group .option label {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */ /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
top:auto;
left:auto;
position:relative;
margin-right:1rem;
display:inline-block;
white-space:nowrap;
}
.drb_rbchealthcare--form-content .form-item .option-group .option label input {
display:inline-block;
margin-right:0.5rem;
-webkit-transform: translateY(-0.125rem);
transform: translateY(-0.125rem);
}
@media (hover: none) {
.drb_rbchealthcare--form-content .form-item .option-group .option label input {
-webkit-transform: none;
transform: none
}
}
.drb_rbchealthcare--form-content .form-item .option-group .option label:first-child {
margin-left:0;
}
.drb_rbchealthcare--form {
padding-top: 1.5rem;
padding-bottom: 0;
}
.drb_rbchealthcare--form h3 {
text-align:center;
font-size:1.6875rem;
color:#105065;
position: relative;
}
.drb_rbchealthcare--form h3 + p {
margin-top: 0!important;
}
@media (min-width: 480px) {
.drb_rbchealthcare--form {
padding-bottom: 1.75rem
} }
.drb_rbchealthcare--form button {
color:white;
padding-top:1.25rem;
padding-bottom:1.25rem;
padding-left: 3rem;
padding-right: 3rem;
border:none;
position: relative;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 1.5rem;
font-weight:600;
border-radius:0.375rem!important;
text-transform: none;
background-color: #e85733;
text-transform: uppercase;
letter-spacing: 0.04em;
-webkit-transition:all 0.25s ease-in-out;
transition:all 0.25s ease-in-out;
}
.drb_rbchealthcare--form button:hover {
background-color:rgb(209, 78, 46);
}
.drb_rbchealthcare--form button:active, .drb_rbchealthcare--form button:focus {
outline:none;
}
.drb_rbchealthcare--form-header h3 {
font-family: Lato, Helvetica, Arial, sans-serif;
font-weight:300;
text-align: center;
padding-left: 1rem;
padding-right: 1rem;
font-size:1.25rem;
line-height: 1.4;
color:#626366;
margin-bottom: 0;
}
@media (min-width: 24rem) {
.drb_rbchealthcare--form-header h3 {
padding-left: 2rem;
padding-right: 2rem
} }
.drb_rbchealthcare--form-wrapper {
-moz-box-sizing: border-box;
box-sizing: border-box;
display:block;
width:100%;
position: relative;
overflow-x:visible;
margin-bottom: -1.5rem;
padding-top:1.75rem;
padding-bottom:1.75rem;
}
@media (min-width: 768px) {
.drb_rbchealthcare--form-wrapper {
position:absolute;
top:0;
right:0;
width:50%;
} }
.drb_rbchealthcare--form-wrapper:before {
/* content:''; */
position:absolute;
top:0;
left:50%;
min-width:100vw;
height:100%;
background: -webkit-linear-gradient(top, white 0%, white 75%, #f4f4f4 100%);
background: linear-gradient(to bottom, white 0%, white 75%, #f4f4f4 100%);
margin-left: -50vw;
}
@media (min-width: 768px) {
.drb_rbchealthcare--form-wrapper:before { content:none
} }
.drb_rbchealthcare--form-content {
max-width:400px;
margin-left: auto;
margin-right: auto;
display:block;
position: relative;
background-color: white;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding:1rem 0;
}
@media (min-width: 640px) {
.drb_rbchealthcare--form-content {
padding:1.125rem 1.75rem
} }
@media (min-width: 768px) {
.drb_rbchealthcare--form-content {
padding:2rem 1.5rem;
max-width:100%
} }
.drb_rbchealthcare--form-content p {
letter-spacing: 0;
line-height: 1.6;
color:#626366;
-webkit-transform:translateY(0.75rem);
transform:translateY(0.75rem);
}
.drb_rbchealthcare--form-content p a {
border-bottom-color:#626366!important;
color:#626366!important;
}
.drb_rbchealthcare--field-group {
position: relative;
margin-top: 2rem;
}
.drb_rbchealthcare--field-group:nth-child(2) { margin-top: 1rem; }
.drb_rbchealthcare--field-group:nth-child(3) { margin-top: 2rem; }
.drb_rbchealthcare--field-group label {
display:block;
width:auto;
position: relative;
letter-spacing: 0.01em;
line-height: 1;
color:#626366!important;
-webkit-transition:all 0.25s ease-in-out;
transition:all 0.25s ease-in-out;
margin-bottom: 0.375rem;
}
.drb_rbchealthcare--field-group input[type="text"], .drb_rbchealthcare--field-group input[type="email"] {
outline:none;
width:100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
line-height: 1;
padding:1.125rem 1rem 1rem 1rem;
background-color: transparent;
border:1px solid #c3c3c3;
border-radius: 0.375rem;
-webkit-transition:all 0.25s ease-in-out;
transition:all 0.25s ease-in-out;
position: relative;
background-color: white;
margin-top: 0.375rem;
}
.drb_rbchealthcare--field-group input[type="text"]:focus, .drb_rbchealthcare--field-group input[type="email"]:focus {
border-color:#105065;
}
.drb_rbchealthcare--field-group.radio.error .error-message {
color:#e85733!important;
}
.drb_rbchealthcare--field-group .error-message {
display:none;
position:absolute;
font-size:0.88rem;
top:-0.0625rem;
line-height: 1;
right:0.125rem;
color:#e85733!important;
letter-spacing: 0.01em;
}
.drb_rbchealthcare--field-group.active, .drb_rbchealthcare--field-group.hasvalue {
}
.drb_rbchealthcare--field-group.active label {
color:#105065;
}
.drb_rbchealthcare--field-group.error:before {
content:'';
position:absolute;
top:-0.625rem;
left:-0.625rem;
width:calc(100% + 1.25rem);
height:calc(100% + 1.25rem);
display:block;
outline:1px solid #e85733;
outline:1px solid rgba(232, 87, 51, 0.33);
}
.drb_rbchealthcare--field-group.error .error-message { display:block; }
.drb_rbchealthcare--field-group.error input[type="text"], .drb_rbchealthcare--field-group.error input[type="email"] {
border-color:#e85733;
}
.drb_rbchealthcare .error-message { visibility: hidden; }
#drb_rbchealthcare--submit {
padding-left: 3rem!important;
padding-right: 3rem!important;
}
#drb_rbchealthcare--submit:focus, #drb_rbchealthcare--submit:active {
font-size:100%;
outline:none!important
}
#drb_rbchealthcare--submit + p {
font-size:0.92rem;
}
.drb_rbchealthcare--hidden-submit {
visibility:hidden;
height:0;
margin:0;
padding:0;
overflow:hidden;
position:fixed;
left:-10000px;
}
.drb_rbchealthcare--select {
border-radius:0.375rem!important;
border:1px solid #c3c3c3;
display:block;
position: relative;
padding:0 0.5rem 0 0.5rem;
}
.drb_rbchealthcare--select select {
border:none;
padding:1.4375rem 0.5rem 0.8125rem 0.5rem;
font-size:17px;
font-family: Lato, Helvetica, Arial, sans-serif;
width:100%;
height:3.6875rem;
background:white;
color:#999999;
}
.drb_rbchealthcare--select select:active, .drb_rbchealthcare--select select:focus {
outline:none;
}
.hasvalue .drb_rbchealthcare--select select, .valid .drb_rbchealthcare--select select {
color:black;
}
window.onload = function () {
if (!window.jQuery) { loadJQuery(); }
(jQuery)(function(){
initFormValidation('.drb_rbchealthcare--form form');
});
}
function loadJQuery(){
var myscript = document.createElement( 'script' );
myscript.type = 'text/javascript';
myscript.src = 'https://code.jquery.com/jquery-3.4.1.min.js';
document.documentElement.childNodes[0].appendChild( myscript );
}
function initFormValidation(theForm) {
var formObj = jQuery(theForm);
var editableInputs = formObj.find('input[type="text"],input[type="email"]');
selectInputs = formObj.find('select');
selectInputs.each(function(){
if (jQuery(this)[0].selectedIndex > 1) {
jQuery(this).parents('.drb_rbchealthcare--field-group').addClass('hasvalue');
}
});
selectInputs.on('change',function(){
var parentObj = jQuery(this).parents('.drb_rbchealthcare--field-group');
if(jQuery(this)[0].selectedIndex > 1) {
parentObj.addClass('hasvalue');
} else {
parentObj.removeClass('hasvalue');
}
});
editableInputs.each(function(){ preCheckInput(jQuery(this)); });
editableInputs.on('focus',function(){jQuery(this).parents('.drb_rbchealthcare--field-group').addClass('active')});
editableInputs.on('blur',function(){
preCheckInput(jQuery(this));
});
jQuery('#drb_rbchealthcare--submit').on('click',function(){
var errorCount = 0;
errorCount += checkInputs(formObj.find('#form-whoareyou'),['Please select an option'],'submit');
errorCount += checkInputs(formObj.find('#form-email'),['Email is required','Email address is not valid'],'submit');
if (errorCount == 0) {
var emailSelector = 'input[type="email"]';
var emailVal = formObj.find(emailSelector).val();
var profileSelector = 'input[type="radio"]';
var profileVal = formObj.find(profileSelector+':checked').val();
console.log('profileVal',profileVal);
triggerSquareSpaceForm( formObj,[ { selector:emailSelector, value:emailVal }, { selector:profileSelector, value:profileVal } ] );
} else {
}
});
jQuery('.option-group .option').on('click',function(){
checkInputs(formObj.find('#form-whoareyou'),[],'blur');
});
jQuery('input[type="email"]').on('blur',function(){
checkInputs(formObj.find('#form-email'),['Email is required','Email address is not valid'],'blur');
});
}
function triggerSquareSpaceForm(formObj, formData) {
var ssForm = jQuery('#block-yui_3_17_2_1_1580218461582_42590');
var profile = '';
var nextUrl = '';
for ( obj of formData ) {
console.log('obj.value',obj.value);
if (obj.selector.indexOf('radio') !== -1) { ssForm.find(obj.selector+'[value="'+obj.value.trim()+'"]').prop('checked', true); profile = obj.value.trim(); }
if (obj.selector.indexOf('email') !== -1) { ssForm.find(obj.selector).val(obj.value); }
}
if (profile.toLowerCase().trim().indexOf('student') != -1) {
nextUrl = 'http://www.rbcroyalbank.com/student/specialist-locator';
} else {
nextUrl = 'https://www.rbcroyalbank.com/healthcare/physician/specialist-locator/en';
}
console.log('nextUrl',nextUrl);
var theSubmit = ssForm.find('input[type="submit"]');
console.log(theSubmit.val());
if (typeof theSubmit !== 'undefined') { theSubmit.trigger('submit'); }
jQuery('.drb_rbchealthcare--form').slideUp(500,function(){
jQuery('.drb_rbchealthcare--form-message').slideDown(500,function(){
console.log('ssForm',ssForm);
window.location.href = nextUrl;
});
});
}
function preCheckInput(thisInput) {
var parentObj = thisInput.parents('.drb_rbchealthcare--field-group');
parentObj.removeClass('active');
var theVal = thisInput.val();
if (typeof theVal !== 'undefined' && theVal.trim() !== '') {
parentObj.addClass('hasvalue');
} else {
parentObj.removeClass('hasvalue');
}
if (parentObj.hasClass('error')) {
var inputType = thisInput.attr('type');
if (validateInputValue( thisInput.val(), inputType ) ) { parentObj.removeClass('error'); }
}
}
function checkInputs(obj,messageArray,context) {
var parentObj = obj.parents('.drb_rbchealthcare--field-group');
if (typeof obj.val() !== 'undefined') {
parentObj.removeClass('error');
if (obj.hasClass('option-group')) {
if ( obj.find('input[type="radio"]:checked').length == 0 ) {
parentObj.addClass('error').find('.error-message').text(messageArray[0]);
return true;
}
} else {
if ( obj.attr('type')=='email' && obj.val().trim().length > 0 && !validateInputValue( obj.val().trim(), 'email' )) {
parentObj.addClass('error').find('.error-message').text(messageArray[1]);
return true;
}
if (obj.val().trim().length == 0 && context !== 'blur') {
parentObj.addClass('error').find('.error-message').text(messageArray[0]);
return true;
}
}
parentObj.addClass('valid');
parentObj.removeClass('error');
return false;
}
return true;
}
function validateEmail(value) {
return true;
}
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
function validateInputValue(value,type) {
var accentedCharacters = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸçÇßØøÅåÆæœ";
if ( typeof type == 'undefined' ) { type = 'anythinggoes'; }
switch (type) {
case 'email':
var preRe = '^(([^()\\[\\]\\\\.,;:\\s@"]+(\\.[^()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$';
break;
case 'postalcode':
var preRe = '^(\\d{5}(-\\d{4})?|[a-ceghj-nprstvxy]\\d[a-ceghj-nprstv-z][ ]{0,}?\\d[a-ceghj-nprstv-z]\\d)$';
break;
case 'telephone':
var preRe = '^(\\+\\d{1,2}\\s)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$';
break;
case 'text':
var preRe = '^[ ]{0}[a-zA-Z]{1,}.*';
break;
case 'anythinggoes':
var preRe = '^[ ]{0}[a-zA-Z]{1,}.*';
break;
}
var re = new RegExp(preRe);
return re.test(String(value).toLowerCase().trim());
}
Note: We will only use your email address for internal tracking purposes and will share it with RBC for those purposes. Neither we nor RBC will use it to contact you or for any other purpose unless you tell us otherwise.
This article offers general information only and is not intended as legal, financial or other professional advice. A professional advisor should be consulted regarding your specific situation. While information presented is believed to be factual and current, its accuracy is not guaranteed and it should not be regarded as a complete analysis of the subjects discussed. All expressions of opinion reflect the judgment of the author(s) as of the date of publication and are subject to change. No endorsement of any third parties or their advice, opinions, information, products or services is expressly given or implied by RBC Ventures Inc. or its affiliates.