Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
faq:support:clients:api:registration:full_example [2019/07/11 12:21] kubafaq:support:clients:api:registration:full_example [2019/07/11 13:00] kuba
Line 26: Line 26:
 Simply analyze the source code of the page, it's self explanatory and well commented  Simply analyze the source code of the page, it's self explanatory and well commented 
  
 +
 +===== Default Values =====
 +You can set default values for pick lists in registration form.
 +
 +Fields that can have default value:
 +
 +**1.** reg.defaults.titleid    **(Title)** | Available values:
 +      * Mr. = 1
 +      * Ms. = 2
 +      * Mrs. = 3
 +
 +
 +**2.** reg.defaults.leverage   **(Leverage)** | Available values:
 +      * It depends of what options you have in your form. For example if one of the options in form is 1:500 then value that you need to set as default is 500.
 +
 +
 +**3.** reg.defaults.currencyId **(Currency)** | Available values:
 +      * Euro = 49
 +      * Pund Sterling = 52
 +      * US Dollar = 151
 +      * In case when you have other currencies in your picklist, you can find ID of currency by inspecting page source in your browser.ID is shown as option value.
 +
 +
 +**4.** reg.defaults.tradingAccountTypeId **(Trading Account Type)** | Available values:
 +      * Standard = 1
 +      * VIP = 2
 +      * Platinum = 3
 +      * In case  when you have other types, you can find it's ID by inspecting page source.ID is shown as option value.
 +
 +
 +**EXAMPLE USAGE**
 +<code>
 +reg.defaults.leverage = 500;
 +reg.defaults.currencyId = 151;
 +reg.defaults.tradingAccountTypeId = 1;
 +</code>
 +
 +This code must be included in java script in the end of page.
 +Important thing is that this code needs to be loaded after picklists are filled with data.
 +
 +
 +
 +
 +<color #ed1c24>**!!! Important !!!**</color>
 +
 +**Default values requires registrationapi.js in version 1.18**
  
faq/support/clients/api/registration/full_example.txt · Last modified: 2019/08/14 09:44 by kuba
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0