- Centova Cast - Client Usage Guide
- Centova Cast - Client Reference Manual
Song Requests
About the Widget
The Song Requests widget shows a form that your visitors use to request songs. The form has these fields:
Song artist
Specifies the artist of the requested song. This field is required.Song title
Specifies the title of the requested song. This field is required.Dedicated to
Specifies the person to whom the visitor dedicates the song. This field is optional.Your name
Specifies the name of the visitor. This field is optional.Your email
Specifies the email address of the visitor. This field is required.
The visitor clicks Submit song request to send the request. The form then shows a message above the fields. The
message tells the visitor whether Centova Cast accepted the request. After a successful request, the form clears the
artist, title and dedication fields.
If Autocomplete artist and song names is set to Yes, the form suggests artist names and song titles from your
media library. The suggestions start after the visitor types three characters.
Centova Cast either adds the requested song to the autoDJ queue automatically, or sends the request to the email address of your account. The Song Requests settings on the Widgets tab of the configuration settings control this. Centova Cast also limits the number of requests that one visitor can send in a period of time.
This widget is available only if Enable song request widget is set to Yes. For more information, see the
Widgets section of the configuration settings.
Widget Code
The anchor code is a <form> element with the class cc_request_form. The form contains the fields and the submit
button. You can change the labels and the layout of the form. Keep these parts of the code, because the widget uses
them:
- The
idattribute of each field:cc_request_artist,cc_request_title,cc_request_dedication,cc_request_senderandcc_request_email. - The
data-type="submit"attribute of the submit button. - The
<div data-type="result">element, which shows the message after a request. If you remove it, the widget adds a message element at the top of the form.
The required attributes in the code make the browser check the required fields before the form is sent.
Advanced Customization
The advanced code contains a different version of the form. This version uses the CSS classes of the Bootstrap
framework, for example form-group, form-control and btn btn-primary. Use it if your web site uses Bootstrap.
This widget has no configurable options.
CSS
The widget uses these CSS classes:
/* the request form */
.cc_request_form {
}
/* the message after a request: "alert-success" or "alert-danger" is added */
.cc_request_form .result-message {
}
/* the list of autocomplete suggestions */
.cc_request_auto {
}