Hello all,
Instead of birth_year we want a category of the current status of people involved with our university. I figure the easiest way to do this is to change change the birth_year to accept more than just numbers.
I'm having issues with changing the birth_year for contributors to something else. I've edited it from an integer in the database to varchar however I'm still getting an error that reads "Invalid type named CurrentStudent provided!" when trying to insert CurrentStudent as birth year.
The original code looks like this:
<div class="field">
<label>Birth Year:</label>
<input type="text" name="contributor[birth_year]" value="" id="birth_year" />
</div>
The code I've changed looks something like this:
<label>Your Status:</label>
<p>
<?php
select(array('name'=>'type', 'id'=>'birth_year'),
array('CurrentStudent'=>'Current Student','CurrentFaculty'=>'Current Faculty','CurrentStaff'=>'Current Staff', 'Alumni'=>'Alumni', 'FormerFaculty'=>'Former Faculty', 'FormerStaff'=>'Former Staff', 'Other'=>'Other'), empty($_POST['birth_year'
]) ? 'Document' : h($_POST['birth_year']));
?>