⚠ In case you've missed it, we have migrated 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 is an archived forum. ⚠

  •     

profile picture

set upload field on file created by edit_fields



rickrs

rickrs
  • profile picture
  • Member

Posted 16 September 2020 - 22:08 PM

hI Guys, thanks for read my problem :)

what i have

1 table A

1 table B

all data from table A is read only:

...

$crud->set_table('table_A');

$crud->field_type('table_A_name','readonly');

$crud->field_type('table_A_Photo','readonly');

...

 

and table B is my table to save the new data.

so my form is

 

table_A_name (text  read only )

table_A_Photo ( image read only )

 

them i added 2 fields using

 

$crud->edit_fields('table_A_name','table_A_Photo',

'table_B_name','table_B_Photo')

 

and added a custom model to receive the post_array .

and save in my table_B, its works.

 

i have the form only editable fields Table_B.

 

 

but my problem is, how i set the upload_field in table_B_Photo ? i put the line

 

$crud->set_upload_field("table_B_Photo","assets/files/tmp");

 

and the crud view display a input text field.

 

 

 
this is possible in some way?

 

 

thanks in advance