mercredi 12 mai 2021

Pre-populating data using previous form into new form with laravel

Trying to utilize customers information in their profile from an administration portal and use it in another form, such as a tech support request with general information pre-filled out. It needs to be redirected from the applicants profile page and use their information out of all applicants.

I am utilizing bootbox.js to confirm to submission:

$('#submitRequestBtn').on('click', function () {
  bootbox.dialog({
  title: 'Submit Title',
  className: 'resquest-modal',
  buttons: {
   cancel: {
    label: 'Cancel',
   }
   confirm:{
    label: 'Confirm request',
   }
   callback: function(result) {
    if (result === true) {
     location.href == route('createRequest');
    }
   }
  }
 });
});

I am pretty new at this and not sure if I need to include an ajax method to bring this data over or have to use a controller for the data. I am kind of clueless on how to set this up when the profile has mixed forms for input such as the customer's name is set within html as

()

A snippet of the html is:

<div>
  <table class='table'>
    <tr>
       <td>
         <label> title </label>
         <p>  </p>
       </td>
    </tr>
  </table>
</div>

<div>
  <label> Assigned worker </label>
  <input type='text' name='assigned_owner' id ='owner_name' value='' >
</div> 



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire