QUESTION #1

Model: Activity
Field: Name

Which of the following will be used to hide the field in the form?

A. uadmin.Schema["activity"].FieldByName("Name").FormDisplay = true
B. uadmin.Schema["activity"].FieldByName("Name").FormDisplay = false
C. uadmin.Schema["activity"].FieldByName("Name").ListDisplay = true
D. uadmin.Schema["activity"].FieldByName("Name").ListDisplay = false


QUESTION #2

Model: Report
Field: CreatedBy

Which of the following will be used so that the field cannot be modified?

A. uadmin.Schema["report"].FieldByName("CreatedBy").Disabled = "true"
B. uadmin.Schema["report"].FieldByName("CreatedBy").Disabled = true
C. uadmin.Schema["report"].FieldByName("CreatedBy").ReadOnly = "true"
D. uadmin.Schema["report"].FieldByName("CreatedBy").ReadOnly = true


QUESTION #3

Model: User
Field: Password

Which of the following will be used to display an error message in a field?

A. uadmin.Schema["user"].FieldByName("Password").ErrMsg = true
B. uadmin.Schema["user"].FieldByName("Password").ErrorMsg = true
C. uadmin.Schema["user"].FieldByName("Password").ErrMessage = true
D. uadmin.Schema["user"].FieldByName("Password").ErrorMessage = true


QUESTION #4

Model: Machine
Field: Code

The assigned value is 123456.

Which of the following will be used to assign a value automatically when you create a new record?

A. uadmin.Schema["machine"].FieldByName("Code").Value = "123456"
B. uadmin.Schema["machine"].FieldByName("Code").DisplayValue = "123456"
C. uadmin.Schema["machine"].FieldByName("Code").Contains = "123456"
D. uadmin.Schema["machine"].FieldByName("Code").DefaultValue = "123456"


QUESTION #5

Model: Gallery
Field: Video

The assigned path is /media/videos/.

Which of the following will be used to set a path for the uploaded files?

A. uadmin.Schema["gallery"].FieldByName("Video").Upload = "/media/videos/"
B. uadmin.Schema["gallery"].FieldByName("Video").Save = "/media/videos/"
C. uadmin.Schema["gallery"].FieldByName("Video").UploadTo = "/media/videos/"
D. uadmin.Schema["gallery"].FieldByName("Video").SaveTo = "/media/videos/"


QUESTION #6

The Javascript file was located in /static/js/ path with the filename of "form.js".

Which of the following will be used to read a Javascript file for the form in the Computer model with the URL of computer?

A. modelschema := uadmin.ModelSchema{
                Name: "Computer",
                ModelName: "computer",
                IncludeFormJS: "/static/js/form.js",
        }


B. modelschema := uadmin.ModelSchema{
                Name: "computer",
                ModelName: "Computer",
                IncludeFormJS: "/static/js/form.js",
        }


C. modelschema := uadmin.ModelSchema{
                Name: "Computer",
                ModelName: "computer",
                IncludeFormJS: []string{"/static/js/form.js"},
        }


D. modelschema := uadmin.ModelSchema{
                Name: "computer",
                ModelName: "Computer",
                IncludeFormJS: []string{"/static/js/form.js"},
        }



QUESTION #7

The Javascript file was located in /static/js/ path with the filename of "list.js".

Which of the following will be used to read a Javascript file for the list in the Score model with the URL of score?

A. modelschema := uadmin.ModelSchema{
                Name: "Score",
                ModelName: "score",
                IncludeListJS: []string{"/static/js/list.js"},
        }


B. modelschema := uadmin.ModelSchema{
                Name: "Score",
                ModelName: "score",
                IncludeListJS: "/static/js/list.js",
        }


C. modelschema := uadmin.ModelSchema{
                Name: "score",
                ModelName: "Score",
                IncludeListJS: []string{"/static/js/list.js"},
        }


D. modelschema := uadmin.ModelSchema{
                Name: "score",
                ModelName: "Score",
                IncludeListJS: "/static/js/list.js",
        }



QUESTION #8

Suppose you have given source as shown below:

field := uadmin.F{
     Name: "Dog",
     TypeName: "string",
}

Which of the following will be used to include the field in the Animal model with the URL of animal?

A. modelschema := uadmin.ModelSchema{
                Name: "Animal",
                ModelName: "animal",
                Fields: uadmin.F{field},
        }


B. modelschema := uadmin.ModelSchema{
                Name: "animal",
                ModelName: "Animal",
                Fields: []uadmin.F{field},
        }


C. modelschema := uadmin.ModelSchema{
                Name: "animal",
                ModelName: "Animal",
                Fields: uadmin.F{field},
        }


D. modelschema := uadmin.ModelSchema{
                Name: "Animal",
                ModelName: "animal",
                Fields: []uadmin.F{field},
        }



QUESTION #9

Suppose you have given source as shown below:

func RequiredFilter(m *uadmin.ModelSchema, a interface{}, u *uadmin.User){
     // Some codes
}

Which of the following will be used to modify the form in the Appliance model with the URL of appliance?

A. modelschema := uadmin.ModelSchema{
                Name: "Appliance",
                ModelName: "appliance",
                ListModifier: RequiredFilter,
        }


B. modelschema := uadmin.ModelSchema{
                Name: "Appliance",
                ModelName: "appliance",
                FormModifier: RequiredFilter,
        }


C. modelschema := uadmin.ModelSchema{
                Name: "appliance",
                ModelName: "Appliance",
                ListModifier: RequiredFilter,
        }


D. modelschema := uadmin.ModelSchema{
                Name: "appliance",
                ModelName: "Appliance",
                FormModifier: RequiredFilter,
        }



QUESTION #10

Suppose you have given source as shown below:

func RequiredFilter(m *uadmin.ModelSchema, u *uadmin.User) (string, []interface{}){
     // Some codes
}

Which of the following will be used to modify the list in the Stadium model with the URL of stadium?

A. modelschema := uadmin.ModelSchema{
                Name: "stadium",
                ModelName: "Stadium",
                FormModifier: RequiredFilter,
        }


B. modelschema := uadmin.ModelSchema{
                Name: "Stadium",
                ModelName: "stadium",
                ListModifier: RequiredFilter,
        }


C. modelschema := uadmin.ModelSchema{
                Name: "Stadium",
                ModelName: "stadium",
                FormModifier: RequiredFilter,
        }


D. modelschema := uadmin.ModelSchema{
                Name: "stadium",
                ModelName: "Stadium",
                ListModifier: RequiredFilter,
        }



QUESTION #11

Which of the following will be used to set a field with the name of Technology and the data type of string?

A. field := uadmin.F{
                Name: "Technology",
                TypeName: "string",
        }


B. field := uadmin.F{
                Name: "Technology",
                Type: "string",
        }


C. field := uadmin.F{
                Name: "Technology",
                TypeName: string,
        }


D. field := uadmin.F{
                Name: "Technology",
                Type: string,
        }



QUESTION #12

Which of the following will be used to set a field with the name of Description, the data type of string, and set as required?

A. field := uadmin.F{
                Name: "Description",
                TypeName: "string",
                Required: true,
        }


B. field := uadmin.F{
                Name: "Description",
                TypeName: "string",
                Required: "true",
        }


C. field := uadmin.F{
                Name: "Description",
                TypeName: "string",
                Required: false,
        }


D. field := uadmin.F{
                Name: "Description",
                TypeName: "string",
                Required: "false",
        }



QUESTION #13

Which of the following will be used to set a field with the name of Mobile, the data type of string, and an error message that displays "Invalid phone number."?

A. field := uadmin.F{
                Name: "Mobile",
                TypeName: "string",
                ErrMessage: "Invalid phone number.",
        }


B. field := uadmin.F{
                Name: "Mobile",
                TypeName: "string",
                ErrorMsg: "Invalid phone number.",
        }


C. field := uadmin.F{
                Name: "Mobile",
                TypeName: "string",
                ErrorMessage: "Invalid phone number.",
        }


D. field := uadmin.F{
                Name: "Mobile",
                TypeName: "string",
                ErrMsg: "Invalid phone number.",
        }



QUESTION #14

Which of the following will be used to set a field with the name of Distance and the data type of int between the range of 300 and 1200"?

A. field := uadmin.F{
                Name: "Distance",
                TypeName: "int",
                Min: "1200",
                Max: "300",
        }


B. field := uadmin.F{
                Name: "Distance",
                TypeName: "int",
                Max: "300",
                Min: "1200",
        }


C. field := uadmin.F{
                Name: "Distance",
                TypeName: "int",
                Min: "300",
                Max: "1200",
        }


D. field := uadmin.F{
                Name: "Distance",
                TypeName: "int",
                Min: "1200",
                Max: "300",
        }



QUESTION #15

Which of the following will be used to set a field with the name of Progress, the field type of progress_bar, the data type of int, and the Progress Bar where red color is below 50, yellow color is below 75, and green color is between the range of 75 and 100?

A. field := uadmin.F{
                Name: "Progress",
                Type: "progress_bar",
                TypeName: "int",
                ProgressBar: map[float64]string{
                        "red": 50.0,
                        "yellow": 75.0,
                        "green": 100.0,
                }
        }


B. field := uadmin.F{
                Name: "Progress",
                Type: "progress_bar",
                TypeName: "int",
                ProgressBar: map[float64]string{
                        50.0: "red",
                        75.0: "yellow",
                        100.0: "green",
                }
        }


C. field := uadmin.F{
                Name: "Progress",
                Type: "progress_bar",
                TypeName: "int",
                ProgressBar: map[float64]string{
                        "red": "50.0",
                        "yellow": "75.0",
                        "green": "100.0",
                }
        }


D. field := uadmin.F{
                Name: "Progress",
                Type: "progress_bar",
                TypeName: "int",
                ProgressBar: map[float64]string{
                        "50.0": "red",
                        "75.0": "yellow",
                        "100.0": "green",
                }
        }