• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Forms displaying multiple times using for each loop

#11
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 )
Reply

#12
@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.
Reply

#13
(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.

hi if i m not mistaken i have put my query in general help only. thanks for your help. take care
Reply

#14
(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">
Reply

#15
(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.

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">

plz reply m still notgetting the result .
Reply

#16
@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.
Reply

#17
(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.

hi if i m not mistaken i have put my query in general help only. thanks for your help. take care

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 )
Reply

#18
(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.

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.
@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.. :Smilegod bless you
Reply

#19
(11-18-2016, 10:18 PM)sheenam Wrote:
(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.

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.
@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.. :Smilegod bless you
hey thanks for your help it worked. :Smile
Reply

#20
@sheenam, I'm glad it worked for you and that I was able to help. I don't know if it is possible but if you get a chance can you put [SOLVED] in the thread header. Thx.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.