⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Pakman_reload

Member Since 18 Oct 2015
Offline Last Active Oct 28 2015 09:40 AM
-----

Topics I've Started

How change the post_array value after update?

26 October 2015 - 12:33 PM

How can I change the value of fields in post_array after update or insert a record? If I click the "update changes" button but I don't exit from edit window, and I have a call back function that rename the file uploaded, and I click again in the button the post_array has the OLD name of the file and the script fails!!

 


How to set the upload folder according the operation of CRUD (add, edit)?

21 October 2015 - 05:25 PM

Hello, how can I set the value of set_field_upload according the state of the CRUD operation?

				    $state = $crud->getState();
				    $state_info = $crud->getStateInfo();
				    		    				    
				   if ( $state == 'edit' )
				    {
				    	$primary_key = $state_info->primary_key;
					$crud->set_field_upload('foto', 'assets/data/' . $primary_key);	

				    }
				    elseif ( $state == 'add' ) 
				    {
                                         $crud->set_field_upload('foto', 'assets/uploads');	
				    } // if	

This is my code but, don't work, any suggestion? thanks


How to relation three tables in edit/view

18 October 2015 - 09:00 PM

I have three tables:

 

COUNTRIES:

id_country

---

---

---

 

CITIES:

id_city

id_country

---

---

---

 

CENTERS:

id_city

--

--

--

 

How can I show the country, the city and the center information in the edit/view screen if CENTERS is the selected table? any suggestion?