Thank you for your reply. I had to tweak a little to make it work, but it still works.
I have an additional question related to this.
I've modified your javascript function as follows.
<script>
function onAppointmentOpen(args) {
if (this._appointmentAddWindow.find(".custom-fields").length == 0) {
var customDesign = "<tr class='custom-fields'><td class='e-textlabel'>Registeration ID</td><td><input class='RegistrationID' type='text' /></td></tr>";
$(customDesign).insertAfter(this._appointmentAddWindow.find("#" + this._id + "subject"));
}
if (!ej.isNullOrUndefined(args.appointment)) {
this._appointmentAddWindow.find(".RegistrationID").val(args.appointment.RegistrationID);
} else {
this._appointmentAddWindow.find(".RegistrationID").val(getParameterByName('RegistrationID'));
}
this._appointmentAddWindow.find(".subject").val('@ViewBag.Name');
}
</script>
As you see here, I am trying to pre-populate "Subject" with ViewBag.Name. However, when I open appointmentWindow, Subject field is always empty.
I would like to apply at least one of the following three to the subject field.
1. Pre-populate Subject field when the window opens.
2. Hide Subject field and it's label upon opening the window.
3. Pre-populate subject field AND ReadOnly (ideal case).
Thank you
Thank you, it is working now!