Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70791

Alert with Input Text and Radio Button

$
0
0

@zambacto wrote:

hi everyone
this is my code

this.intervention.getrequest("CRM_ArticleList?type=JUSTIF").then(data => {
      this.dataa = data;
      console.log('dataa=',this.dataa.results[0].libArt)
      this._isloaded = true;
    }).catch(err => {
      this._isloaded = true;
      let alert = this.alertCtrl.create({
        title: 'Erreur',
        subTitle: 'Erreur de connexion',
        buttons: ['OK']
      });
      alert.present();
    })
  
  let alert = this.alertCtrl.create ();
  alert.setTitle ('Justif');
  for (let i = 0; i <this.dataa.results.length; i++) {
    alert.addInput ({
      type: 'radio',
      label: this.dataa.results[i].libArt,
      value: this.dataa.results[i].libArt ,
      checked: false
    });
  }
  
  alert.addInput({
    type:'text',
    label:'Surname',
    placeholder: 'Surname'
  });
  
  alert.addButton ('Annuler');
  alert.addButton ({
    text: 'Enregistrer',
    handler: data => {
      this.intervention.postrequest("CRM_ArticleList?type=JUSTIF",data).then(async data => {
        this.res = data;
        if (this.res.message === "success") {
          await this.composent.toastShow("Enregistré avec succés", false, "bottom");
        
        }
    });
  }

  });
  alert.present ();

but like you see i have problem with text input


can anyone help me and thnx :grin: :sweat_smile:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70791

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>