Below, you’ll find a detailed guide on how to add the Loan Repayment Calculator and Application Form Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Loan Repayment Calculator and Application Form Plugin shortcodes not to show or not to work correctly.
Before starting, here is an overview of the Loan Repayment Calculator and Application Form Plugin and the shortcodes it provides:
"Loan Repayment Calculator and Application Form is a versatile WordPress plugin enabling users to calculate loan repayments swiftly and apply directly via an integrated form."
- [qis]
- [qis-subscribe]
- [qisprogress]
Loan Repayment Calculator and Application Form [qis] Shortcode
The Quick Interest Slider shortcode is used to create a dynamic loan calculator. It allows users to input loan parameters such as amount, term, and interest rate, then calculates and displays the total repayment amount. The shortcode employs an array of attributes to customize the calculator’s functionality and appearance. It also responds to user interactions, adjusting calculations in real-time based on input changes. Additionally, it integrates with the Pro Version filters and offers an ‘Apply Now’ button, leading to a customizable application form.
Shortcode: [qis]
Parameters
Here is a list of all possible qis shortcode parameters and attributes:
calculator
– Specifies the calculator to usecurrency
– Designates the type of currencyba
– Adjusts the balance amountprimary
– Defines the primary color for the slidersecondary
– Sets the secondary color for the sliderloanmin
– Sets the minimum loan amountloanmax
– Sets the maximum loan amountloaninitial
– Sets the initial loan amountloanstep
– Sets the increment step for the loan amountperiodslider
– Controls the period sliderperiodmin
– Sets the minimum period valueperiodmax
– Sets the maximum period valueperiodinitial
– Sets the initial period valueperiodstep
– Sets the increment step for the period valueperiod
– Specifies the loan periodinterestslider
– Controls the interest sliderinterestselector
– Controls the interest selectorinterestmin
– Sets the minimum interest rateinterestmax
– Sets the maximum interest rateinterestinitial
– Sets the initial interest rateintereststep
– Sets the increment step for the interest ratemultiplier
– Sets the multiplier for calculationstriggertype
– Determines the type of trigger usedtrigger
– Sets the trigger for calculationsoutputtotallabel
– Sets the label for total outputinteresttype
– Determines the type of interest usedtotallabel
– Sets the label for the total amountprimarylabel
– Sets the label for the primary valuesecondarylabel
– Sets the label for the secondary valueusebubble
– Controls the use of bubble tooltipsrepaymentlabel
– Sets the label for the repayment valueoutputtotal
– Controls the display of the total outputoutputrepayments
– Controls the display of the repayments outputoutputhelp
– Controls the display of the help outputapplication
– Controls the display of the application formbuttons
– Controls the display of buttonsmarkers
– Controls the display of markers on the sliderprocessing
– Controls the display of processing messagesadminfee
– Sets the administration feeadminfeevalue
– Sets the value of the administration feetextinputs
– Controls the display of text inputsdecimals
– Sets the number of decimal placesdiscount
– Sets the discount rateapplynow
– Controls the display of the apply now buttonfixedaddition
– Sets a fixed addition to the total amountfields
– Controls the display of additional fieldsloanlabel
– Sets the label for the loan amounttermlabel
– Sets the label for the term valueinterestlabel
– Sets the label for the interest rateparttwo
– Controls the display of the second part of the formusecurrencies
– Controls the use of multiple currenciesusefx
– Controls the use of foreign exchange ratesusedown
Examples and Usage
Basic example - Display a basic interest slider with default parameters.
[qis /]
Advanced examples
Display an interest slider with a predefined loan amount and period.
[qis loaninitial=5000 periodinitial=24 /]
Display an interest slider with custom range for loan amount and period.
[qis loanmin=1000 loanmax=10000 loanstep=500 periodmin=12 periodmax=60 periodstep=6 /]
Display an interest slider with a specific currency and interest rate.
[qis currency="$" interestmin=5 interestmax=25 /]
Display an interest slider with custom labels for loan amount, term, and interest rate.
[qis loanlabel="Loan Amount" termlabel="Term (months)" interestlabel="Interest Rate (%)" /]
Display an interest slider with a specific calculator from the dropdown (e.g., the second calculator).
[qis calculator="two" /]
PHP Function Code
In case you have difficulties debugging what causing issues with
[qis]
shortcode, check below the related PHP functions code.Shortcode line:
add_shortcode('qis', 'qis_loop');
Shortcode PHP function:
function qis_loop($atts) { qis_get_stored_upgrade(); // Shortcode Attributes $atts = shortcode_atts(array( 'calculator' => '', 'currency' => '', 'ba' => '', 'primary' => '', 'secondary' => '', 'loanmin' => '', 'loanmax' => '', 'loaninitial' => '', 'loanstep' => '', 'periodslider' => '', 'periodmin' => '', 'periodmax' => '', 'periodinitial' => '', 'periodstep' => '', 'period' => '', 'interestslider' => '', 'interestselector' => '', 'interestmin' => '', 'interestmax' => '', 'interestinitial' => '', 'intereststep' => '', 'multiplier' => '', 'triggertype' => '', 'trigger' => '', 'outputtotallabel' => '', 'interesttype' => '', 'totallabel' => '', 'primarylabel' => '', 'secondarylabel' => '', 'usebubble' => '', 'repaymentlabel' => '', 'outputtotal' => '', 'outputrepayments' => '', 'outputhelp' => '', 'application' => '', 'repaymentlabel' => '', 'buttons' => '', 'markers' => '', 'processing' => '', 'adminfee' => '', 'adminfeevalue' => '', 'textinputs' => '', 'interesttype' => '', 'decimals' => '', 'discount' => '', 'applynow' => '', 'fixedaddition' => '', 'application' => '', 'fields' => '', 'loanlabel' => '', 'termlabel' => '', 'interestlabel' => '', 'parttwo' => '', 'usecurrencies' => '', 'usefx' => '', 'usedownpayment' => '', 'float' => '', 'percentages' => '', 'usegraph' => '', 'interestdropdown' => '', 'terminterface' => '', 'use' => '' ),$atts,'quick-interest-slider'); if (isset($_GET['amount']) && $_GET['amount']) $atts['loaninitial'] = $_GET['amount']; if (isset($_GET['term']) && $_GET['term']) $atts['periodinitial'] = $_GET['term']; $dropdown = qis_get_stored_dropdown(); if ($atts['use'] == 'dropdown') $dropdown['use'] = true; if ($atts['calculator'] == 'one') $atts['calculator'] = 1; if ($atts['calculator'] == 'two') $atts['calculator'] = 2; if ($atts['calculator'] == 'three') $atts['calculator'] = 3; if ($atts['calculator'] == 'four') $atts['calculator'] = 4; if ($atts['calculator'] == 'five') $atts['calculator'] = 5; if ($atts['calculator'] == 'six') $atts['calculator'] = 6; if ($atts['calculator'] == 'seven') $atts['calculator'] = 7; if ($atts['calculator'] == 'eight') $atts['calculator'] = 8; // Pro Version filters $qppkey = qis_key(); if (!isset($qppkey['authorised'])) { $atts['loanlabel'] = $atts['termlabel'] = $atts['application'] = $atts['applynow'] = $atts['interestslider'] = $atts['intereselector']= $atts['usecurrencies'] = $atts['usefx'] = $atts['usedownpayment'] = $atts['terminterface'] = false; if ($atts['interesttype'] == 'amortization' || $atts['interesttype'] == 'amortisation') $atts['interesttype'] = 'compound'; } global $post; // Apply Now Button if (!empty($_POST['qisapply'])) { $formvalues = qis_check_key($_POST); if (isset($_GET['param'])) { $formvalues['param'] = $_GET['param']; } else { $formvalues['param'] = false; } $settings = qis_get_stored_settings($formvalues['formname']); $dropdown = qis_get_stored_dropdown(); $url = $settings['applynowaction']; if ($settings['applynowquery']) { $settings['querystructure'] = str_replace('[total]', $_POST['totalamount'], $settings['querystructure']); $settings['querystructure'] = str_replace('[amount]', $_POST['loan-amount'], $settings['querystructure']); $settings['querystructure'] = str_replace('[term]', $_POST['loan-period'], $settings['querystructure']); $settings['querystructure'] = str_replace('[rate]', $_POST['rate'], $settings['querystructure']); $settings['querystructure'] = str_replace('[form]', $formvalues['formname'], $settings['querystructure']); $settings['querystructure'] = str_replace('[calculator]', $dropdown['forms'][$formvalues['formname']], $settings['querystructure']); if ($formvalues['param']) $settings['querystructure'] = str_replace('[param]', $formvalues['param'], $settings['querystructure']); $url = $url.$settings['querystructure']; } echo "<p>".__('Redirecting....','quick-interest-slider')."</p><meta http-equiv='refresh' content='0;url=$url' />"; die(); // Application Form } elseif (!empty($_POST['qissubmit'])) { $formvalues = $_POST; $formerrors = array(); if (!qis_verify_form($formvalues, $formerrors)) { return qis_display($atts,$formvalues, $formerrors,null); } else { $formvalues = qis_process_form($formvalues); $apply = qis_get_stored_application_messages($formvalues['formname']); if ($apply['enable'] || $atts['parttwo']) return qis_display_application($formvalues,array(),'checked'); else return qis_display($atts,$formvalues, $formerrors,'registered'); } // Part 2 Application } elseif (!empty($_POST['part2submit'])) { $formvalues = $_POST; $formerrors = array(); if (!qis_verify_application($formvalues, $formerrors)) { return qis_display_application($formvalues, $formerrors,null); } else { qis_process_application($formvalues); return qis_display_result($formvalues); } } elseif (!isset($_POST['attributes']) && ($dropdown['use'])) { // Show Dropdown $dd = '<select id="calculators">'; $one = 1; $i = 1; $addition = 'selected="selected"'; foreach ($dropdown['forms'] as $key => $name) { if ($name) { $dd .= '<option value="'.$i.'" '.$addition.'>'.$name.'</option>'; if ($one++ == 1) $addition = ''; } $i++; } $dd .= "</select>"; $_POST['attributes'] = []; // Append The Default Calculator $dd .= '<div id="calculator-container">'; $dd .= qis_loop($atts); $dd .= "</div>"; return $dd; } else { // Default Display $formnumber = $atts['calculator']; $theform = (!$formnumber || $formnumber == 1) ? 1 : $formnumber; $settings = qis_get_stored_settings($theform); $track = qis_get_track(); if (isset($track['enabletracking']) && $track['enabletracking']) { @$track['visitors']++; update_option('qis_track',$track); } $arr = explode(",",$settings['interestdropdownvalues']); //$values = qis_get_stored_register($theform); $values['formname'] = $theform; $values['interestdropdown'] = $arr[0]; $digit1 = mt_rand(1,10); $digit2 = mt_rand(1,10); if( $digit2 >= $digit1 ) { $values['thesum'] = "$digit1 + $digit2"; $values['answer'] = $digit1 + $digit2; } else { $values['thesum'] = "$digit1 - $digit2"; $values['answer'] = $digit1 - $digit2; } return qis_display($atts,$values ,array(),null); } }
Code file location:
quick-interest-slider/quick-interest-slider/quick-interest-slider.php
Loan Repayment Calculator and Application Form [qis-subscribe] Shortcode
The Quick Interest Slider (QIS) shortcode 'qis-subscribe' manages subscription and unsubscription of users. It verifies subscription requests, sends notifications, and updates the user's status.
Shortcode:
[qis-subscribe]
Examples and Usage
Basic example - Displays the subscription confirmation or error message based on the 'sub' GET parameter.
[qis-subscribe sub=1234567890 /]
Advanced examples
Using the shortcode to display a message based on the 'sub' GET parameter. If the 'sub' GET parameter matches a timestamp in the 'qis_messages' option and the message has not been confirmed, it sends a notification and updates the message to confirmed. If the message is already confirmed, it displays a different message.
[qis-subscribe sub=1234567890 notification=true /]
Using the shortcode to display a message based on the 'unsub' GET parameter. If the 'unsub' GET parameter matches a timestamp in the 'qis_messages' option, it removes the message and displays a message confirming the unsubscription. If the message is not found, it displays a different message.
[qis-subscribe unsub=1234567890 /]
PHP Function Code
In case you have difficulties debugging what causing issues with
[qis-subscribe]
shortcode, check below the related PHP functions code.Shortcode line:
add_shortcode('qis-subscribe', 'qis_subscribe');
Shortcode PHP function:
function qis_subscribe() { $message = get_option('qis_messages'); $auto = qis_get_stored_autoresponder(null); if ( isset ($_GET['sub']) ) { $ref = $_GET['sub']; foreach ($message as $key => $value ) { if ($ref == $value['timestamp'] && $value['confirmed'] != true) { if ($auto['notification']) qis_send_notification ($value); $message[$key]['confirmed'] = true; update_option('qis_messages',$message); return '<div class="emailresponse">'.$auto['subscribemessage'].'</div>'; } } return '<div class="emailresponse">'.$auto['subscribealready'].'</div>'; } if ( isset ($_GET['unsub']) ) { $ref = $_GET['unsub']; foreach ($message as $key => $value ) { if ($ref == $value['timestamp']) { unset($value); $message = array_values($message); update_option('qis_messages',$message); return '<div class="emailresponse">'.$auto['unsubscribemessage'].'</div>'; } } return '<div class="emailresponse">You have already unsubscribed</div>'; } }
Code file location:
quick-interest-slider/quick-interest-slider/quick-interest-slider.php
Loan Repayment Calculator and Application Form [qisprogress] Shortcode
The Quick Interest Slider shortcode is designed to display a progress bar on a webpage. This shortcode fetches user data and displays it in a progress bar format. It checks for user input, sanitizes it, and compares it with stored values. If a match is found, it generates a progress bar with steps based on the user's progress. If no match is found, it displays a message. This shortcode also includes a form for users to input their email and reference.
Shortcode:
[qisprogress]
Examples and Usage
Basic example - Displays the progress of a loan application using the email and reference provided by the user.
[qisprogress /]
Advanced examples
Displays the progress of a loan application using the email and reference provided by the user, with the progress steps highlighted in a specific color.
[qisprogress highlight="#FF0000" /]
Displays the progress of a loan application using the email and reference provided by the user, with the progress steps highlighted in a specific color and the background of the progress steps in a different color.
[qisprogress highlight="#FF0000" background="#FFFFFF" /]
Displays the progress of a loan application using the email and reference provided by the user, with the progress steps highlighted in a specific color, the background of the progress steps in a different color, and the rejected steps in yet another color.
[qisprogress highlight="#FF0000" background="#FFFFFF" rejected="#000000" /]
Please note that in the advanced examples, the colors are specified using hexadecimal color codes. You can replace these with any valid color code of your choice.
PHP Function Code
In case you have difficulties debugging what causing issues with
[qisprogress]
shortcode, check below the related PHP functions code.Shortcode line:
add_shortcode('qisprogress', 'qis_show_progress');
Shortcode PHP function:
function qis_show_progress() { $content = false; $progress = qis_get_stored_progress(); if (!empty($_POST['showprogress']) && check_admin_referer("save_qis")) { $formvalues = $_POST; $formvalues['youremail'] = filter_var($formvalues['youremail'],FILTER_SANITIZE_EMAIL); $formvalues['reference'] = filter_var($formvalues['reference'],FILTER_SANITIZE_STRING); $message = get_option('qis_messages'); foreach ($message as $key) { if ($formvalues['youremail'] == $key['youremail'] && $formvalues['reference'] == $key['reference']) { $register = qis_get_stored_register(1); $content = '<div class="qis-register">'; if ($progress['showdetails']) { $content .= '<h2>'.$progress['loanlabel'].'</h2>'; $content .= qis_build_message($key,$register); } $content .= '<h2>'.$progress['progresslabel'].'</h2>'; $content .= '<p>'; $steps = explode(",",$progress['progresssteps']); $stop = false; if ($progress['rejected'] && end($steps) == $key['progress']) { $stop = $progress['currentstep'] = true; $progress['highlight'] = $progress['rejectedcolour']; } foreach ($steps as $item) { if ($progress['currentstep']) { $background = $item == $key['progress'] ? ' style="background-color:'.$progress['highlight'].';"' : ' style="background-color:'.$progress['background'].';"'; } else { $background = $stop ? ' style="background-color:'.$progress['background'].';"' : ' style="background-color:'.$progress['highlight'].';"'; if ($item == $key['progress']) $stop = true; } $content .= '<span class="step"'.$background.'>'.$item.'</span>'; } $content .= '</p>'; $content .= '</div>'; } } if ($content) return $content; else return '<h2>'.$progress['nothingfound'].'</h2>'; } $content .= '<form action="" method="POST" class="qis-register"> <p>'.$progress['emaillabel'].'<br> <input type="email" name="youremail" value=""></p> <p>'.$progress['referencelabel'].'<br> <input type="text" name="reference" value=""></p> <p><input onClick="check();" type="submit" value="'.$progress['submitlabel'].'" class="submit" name="showprogress" /><p> <input type="hidden" name="anything" value="'. date('Y-m-d H:i:s').'"> <div class="validator">Enter the word YES in the box: <input type="text" style="width:3em" name="validator" value=""></div>'; $content .= wp_nonce_field("save_qis"); $content .= '</form>'; return $content; }
Code file location:
quick-interest-slider/quick-interest-slider/quick-interest-slider.php
Conclusion
Now that you've learned how to embed the Loan Repayment Calculator and Application Form Plugin shortcodes, understood the parameters, and seen code examples, it's easy to use and debug any issue that might cause it to 'not work'. If you still have difficulties with it, don't hesitate to leave a comment below.
Leave a Reply