⚠ 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

field_type(hidden) and set_relation



lcfabris
  • profile picture
  • Member

Posted 24 August 2015 - 14:48 PM

Ola. Estou com o seguinte problema no CG. Tenho um campo que está relacionado e é um campo HIDDEN.
  • $crud->set_relation('setor_origem', 'setores', 'nome_setor', array('ativo' => 's'));
  • $crud->field_type('setor_origem','hidden',$_SESSION['setor_id']);
 
E o CG não está salvando o valor. (Meu ingles não é muito bom então: traduzido por Google Translator)
 
Hello . I have the following problem in CG . I have a field that is related and is a HIDDEN field.
  • $crud->set_relation('setor_origem', 'setores', 'nome_setor', array('ativo' => 's'));
  • $crud->field_type('setor_origem','hidden',$_SESSION['setor_id']);
 
And the CG is not saving the value. (My English is not very good then: Translated by Google Translator)

 


lcfabris
  • profile picture
  • Member

Posted 22 November 2015 - 21:31 PM

Putz 3 meses e nenhuma resposta!!!  :(  :(  :(

 

Putz three months and no response !!!


Paul Savostin
  • profile picture
  • Member

Posted 23 November 2015 - 16:34 PM

U have to choose ether u have relate field or u have hidden! U cant have both of them, cause if set_relation and hidden field type u anyway will see that field.

 

Mb u need something another and u just dont realize how to resolve?


daniero
  • profile picture
  • Member

Posted 03 September 2016 - 19:36 PM

U have to choose ether u have relate field or u have hidden! U cant have both of them, cause if set_relation and hidden field type u anyway will see that field.

 

Mb u need something another and u just dont realize how to resolve?

Actually... this is something I just found, not sure because I'm just starting with php/ci/gc, but what I want to do, is show the proper text in the listing, but not show this value when adding/editing, as when adding, I want to use a default value as hidden field type...


semsik
  • profile picture
  • Member

Posted 05 December 2016 - 21:27 PM

Check here
/topic/3735-workaround-conflict-hidden-field-and-set-relation/
Greetz