https://kotlinlang.org logo
#server
Title
h

Hamza

06/11/2018, 9:12 AM
Hi everyone. One more question (I’m really dumb): I have a form, and one of the criteria is subject. Here is the div:
<input type="text" name="subjects" placeholder="Subjects" autocomplete="off">
I’m using javalin, and here is how i retrieve the information from the form:
val subjects = ctx getParam "subjects"
Looking good, right? Well, with apache velocity, here is how i display the subjects:
Copy code
#if($book.subjects)
            <tr>
                <th>Subjects</th>
                #foreach($subject in $book.subjects.split(",")))
                    <td>$subject</td>
                #end
            </tr>
        #end
Every time, the table row is empty. anyone got any clue?