mardi 30 juin 2020

FORM Skip logic

Hi i wanted to have a logic in a form where i can update status from 'under review' (default) to either 'approved' or 'on-hold' or 'rejected'. I tried this code to allocate a 3 yr period on date of approval [today]):

<% if(collection.status = "approved"){ %>        
                    <input class="form-control" type="hidden" name="collection[validto]" value="<%=new Date(Date.now() +(1000*60*60*24*30*36)) %>">
        
    <% } else { %>
    <% } %>

But it is not doing the logic. So i must have an error in my coding. Any tip how to solve this?

Aucun commentaire:

Enregistrer un commentaire