Team form widget

Description

The Team form widget is a football widget that allows you to show in your post how a team performs after a specific number of matches.

The Team form widget analyzes a team’s performance during the last 15 matches, adds the points the team gains for each Win (3pts.) /Loss (0pts.) /Draw (1pts.), and then divides them by the total number of points (12pt.) to display how the team is doing, i.e., Bad/Good/Very good/Excellent.

Bind the widget to HTML DOM

🚧

Make sure that you have the loader already set up on your website.
If not, follow our guide:

You can bind the widget to the HTML DOM by two ways:

  • Bind the widget without initial options. The required attribute here is "data-widgetId"
    <div data-widgetId="team-form"></div>
  • Bind the widget with initial options. The all available options can be seen below
    <div data-widgetId="widget-name" data-options='{...}'></div>
  • The optional "data-options" attribute:
    {
        teamId: ""  - Using teamId you can display the team's form for up to 15 matches. This option is required in order to receive information about the team's form.

        seasonIds: ["6206", "6452"] - With this option you specify for which season will the matches be displayed.

        limit: "" - With this option you specify the number of matches needed to build team form statistic. Note that maximum number of matches is 15!

        title: "" - Optional widget title

        lang: "" - Controls the language in which the widget will be displayed.
                   Supported languages: "en", "bg", "ro"

        apiKey: "" - The key used for authorization against the back-end
        apiURL: "" - Base url for the back-end that will be used
        displayTeamShortNamesOnDesktop: (true/false)  -> // This option replaces the team name with its short name on all resolutions, if "displayTeamCustomNamesOnDesktop" is not added
        displayTeamShortNamesOnMobile: (true/false)  -> // This option replaces the team name with its short name on mobile resolutions, if "displayTeamCustomNamesOnMobile" is not added
        displayTeamCustomNamesOnDesktop: (true/false)  -> // This option replaces the team name with its custom name on all resolutions
        displayTeamCustomNamesOnMobile: (true/false)  -> // This option replaces the team name with its custom name on mobile resolutions
    }

Team form widget in the CMS

Currently, the Sportal365 CMS offers a variety of football widgets to enable creators to add sports-specific statistics and context to their articles, videos, or galleries.

Adding the Team form widget to blocky

To add a Team form widget to a post (Article, Video, or Gallery):

  1. Select the + button to open the blocks menu.
  2. Then, Football widgets-->Team form.
  3. Once the widget configuration panel opens, enter a Team / Tournament / Season and set a Match limit.
  4. Select Save Block.

Video example