mardi 31 mai 2016

Alert message when sum of checkboxes is greater than a specific number

I need your help with something I am trying to create.What I want to build is an alert message displaying to user screen when the sum of the values of the checkboxes is greater than a specific number which is stored in the database table.The thing is that I am using php to echo the checkboxes form..

Here is the form:

echo '

     <div>
       <div class="feed-activity-list">
         <div style="border: 0.5px solid green; border-right-style:none;" class="input-group m-b"><span class="input-group-addon"> <input type="checkbox" name="opt" value="'.$points.'"></span>
            <div class="feed-element">
              <a href="profile.html" class="pull-left">
              <img alt="image" class="img-circle" src="'. $row_select4['image_url']. '">
              </a>
            <div class="media-body ">
              <div class="ibox-tools">
                  <span class="label label-primary">ΔΙΑΘΕΣΙΜΟ</span><br><br>
                  <span class="label label-warning-light pull-right"><strong>'  .$row_select4['points'].  '</strong> Πόντοι</span>
              </div>
                  <strong>'  .$row_select4['title'].  ' </strong> '   .$row_select4['description'].  ' <br>
                  <small class="text-muted">Διάρκεια: <strong>'  .$row_select4['start_date'].  ' - '   .$row_select4['end_date'].  ' </strong></small>
              <div class="well">
                                                        '  .$row_select4['description'].  '
           </div>
         </div>
       </div>
     </div>

  </div>'  ;

And the submit button (outside the php script):

<button type="submit" class="btn btn-w-m btn-primary">ΕΞΑΡΓΥΡΩΣΗ</button> 
</form>




Aucun commentaire:

Enregistrer un commentaire