Example for get value from ngNoForm and combine a search in Angular

ngNoForm:

  
Extractee: Status:

.ts index():

    let f = document.getElementById('search_form');
    if (f) {
      if (f.status.value != '' && f.laravel_id.value != '') {
        params = params.set('search', 'status:' + f.status.value + ';laravel_id:' + f.laravel_id.value)
          .set('searchFields', 'status:=;laravel_id:=')
          .set('searchJoin', 'and');
      } else if (f.laravel_id.value != '') {
        params = params.set('search', f.laravel_id.value)
          .set('searchFields', 'laravel_id:=');
      } else if (f.status.value != '') {
        params = params.set('search', f.status.value)
          .set('searchFields', 'status:=');
      }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *