Hi Tim,
I tried edit a profile-form.jsp and i added similarly:
<%
Locale[] supportedLocales = I18nUtil.getSupportedLocales();
EPerson epersonForm = (EPerson) request.getAttribute("eperson");
String lastName = "";
String firstName = "";
String faculty = "";
String phone = "";
String language = "";
// Get non-null values
lastName = epersonForm.getLastName();
if (lastName == null) lastName = "";
firstName = epersonForm.getFirstName();
if (firstName == null) firstName = "";
faculty = epersonForm.getMetadata("faculty");
if (faculty == null) faculty = "";
phone = epersonForm.getMetadata("phone");
if (phone == null) phone = "";
language = epersonForm.getMetadata("language");
if (language == null) language = "";
and
<div class="form-group">
<label class="col-md-offset-3 col-md-2 control-label" for="faculty"><fmt:message key="jsp.register.profile-form.fname.faculty"/></label>
<div class="col-md-3"><input class="form-control" type="text" name="faculty" id="tfaculty" size="40" value="<%= Utils.addEntities(faculty) %>"/></div>
</div>
and when i trying "edit profile" my administrator account in web interface i see internal system error, in logs i see:
Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /register/profile-form.jsp at line 53
50: firstName = epersonForm.getFirstName();
51: if (firstName == null) firstName = "";
52:
53: faculty = epersonForm.getMetadata("faculty");
54: if (faculty == null) faculty = "";
55:
56: phone = epersonForm.getMetadata("phone");
When i commented out 53.54 line i see new field, but when i tried add something, there nothing happend, the field was empty.
What file i have to change? I have to create new field in database? Maybe i did it something wrong in profile-form.jsp ?
Best wishes,
Karol