Full working example of the page using registration API call

!!!IMPORTANT!!!

Replace mydomain.com with your members area URL

CLICK HERE TO SEE THE LIVE EXAMPLE

By default TradingPlatformId is set in the hidden field to MT4Live. You can change this value to:

  • MT4Demo = 1
  • MT4Live = 2
  • SirixDemo = 3
  • SirixReal = 4
  • SpotOptionsDemo = 5
  • SpotOptionsLive = 6
  • MT5Demo = 7
  • MT5Live = 8

You need to read the notes above the live form to get it working.

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

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.

!!! Important !!!

Default values requires registrationapi.js in version 1.8

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