Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
faq:support:clients:api:registration:full_example [2019/07/11 12:21] – kuba | faq: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 | ||
+ | * Mr. = 1 | ||
+ | * Ms. = 2 | ||
+ | * Mrs. = 3 | ||
+ | |||
+ | |||
+ | **2.** reg.defaults.leverage | ||
+ | * 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** | ||
+ | < | ||
+ | reg.defaults.leverage = 500; | ||
+ | reg.defaults.currencyId = 151; | ||
+ | reg.defaults.tradingAccountTypeId = 1; | ||
+ | </ | ||
+ | |||
+ | 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 # | ||
+ | |||
+ | **Default values requires registrationapi.js in version 1.18** | ||