Forms displaying multiple times using for each loop |
Yes, that is the right one. If you look at the top black bar that is the forum name and then the forum topics.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
@sheenam - it appears that when you click the edit button for a specific taxid. You are not passing the specific taxid to your model to only pull that specific record. Instead you are getting all the records. Your call to the edit controller should include the taxid that you wish to edit. Your model function should have a taxid parameter and only return 1 record.
(11-16-2016, 06:07 AM)php_rocs Wrote: @sheenam - it appears that when you click the edit button for a specific taxid. You are not passing the specific taxid to your model to only pull that specific record. Instead you are getting all the records. Your call to the edit controller should include the taxid that you wish to edit. Your model function should have a taxid parameter and only return 1 record. ok ok but my edit button and the form m opening both redirect to different functionalities how can i pass ids. thru the button edit edit button : <td><a data-toggle="modal" data-target="#editModal">Edit</i></a></td> and edit form: <?php echo form_open("settings/tax/updatetaxes?t_id=".$row->t_id,['class'=>'form-horizontal panel' , 'method'=> 'POST']); ?> <div class="form-group"> (11-16-2016, 10:23 PM)sheenam Wrote:(11-16-2016, 06:07 AM)php_rocs Wrote: @sheenam - it appears that when you click the edit button for a specific taxid. You are not passing the specific taxid to your model to only pull that specific record. Instead you are getting all the records. Your call to the edit controller should include the taxid that you wish to edit. Your model function should have a taxid parameter and only return 1 record. plz reply m still notgetting the result .
@sheenam - your popup screen is bringing up data that is hidden in the popup form until you make it visible. Therefore it will always have all the data.
There are a couple of approaches that you can take. I will give you one. 1. create a function called edittaxes in your controller. - This function should look for a t_id (taxid) - Take the t_id and call a model to get the tax id record - Take the results and put it in a view (this view is the exact same as your modal view form (in the original view) - the only difference is that it should be configured to handle one record) 2. You can pull a view into your modal by setting the href attribute in your edit button <a> tag. (ie /settings/tax/edittaxes?t_id=XX) 3. Don't forget to empty out the modal (in the main screen) so that the contents of your view can be put in its' place. Give this a try. (11-16-2016, 10:19 PM)sheenam Wrote:(11-16-2016, 05:36 AM)InsiteFX Wrote: Yes, that is the right one. If you look at the top black bar that is the forum name and then the forum topics. Because it was moved to here from the CodeIgniter 4 forum. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-18-2016, 09:58 AM)php_rocs Wrote: @sheenam - your popup screen is bringing up data that is hidden in the popup form until you make it visible. Therefore it will always have all the data.@php_rocks thanku so much for your help dear. i will try this and let you know whether i was able to do it or no.. : ![]() (11-18-2016, 10:18 PM)sheenam Wrote:hey thanks for your help it worked. :(11-18-2016, 09:58 AM)php_rocs Wrote: @sheenam - your popup screen is bringing up data that is hidden in the popup form until you make it visible. Therefore it will always have all the data.@php_rocks thanku so much for your help dear. i will try this and let you know whether i was able to do it or no.. : ![]() |
Welcome Guest, Not a member yet? Register Sign In |