getting the ID from last topic + fixing the form

getting the ID from last topic + fixing the form