Can we hide fields ONLY when creating a record? - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8) +--- Thread: Can we hide fields ONLY when creating a record? (/showthread.php?tid=1510) |
Can we hide fields ONLY when creating a record? - Guido1982 - 05-14-2019 I would like to hide some fields when creating a record, that are not specifically hidden or inaccessible, but I would like to hide them ONLY when creating records. Do we even have that functionality? RE: Can we hide fields ONLY when creating a record? - joebordes - 05-16-2019 I would say that this can be done with a field dependency map. The condition would be based on the getCRUDMode function to detect if you are creating/editing and hide the field accordingly https://corebos.com/documentation/doku.php?id=en:adminmanual:businessmappings:field_dependency RE: Can we hide fields ONLY when creating a record? - Guido1982 - 05-17-2019 Nice, seems very powerful. Let me try that and get back to you RE: Can we hide fields ONLY when creating a record? - Guido1982 - 05-27-2019 (05-16-2019, 10:15 PM)joebordes Wrote: I would say that this can be done with a field dependency map. The condition would be based on the getCRUDMode function to detect if you are creating/editing and hide the field accordingly I've been reading the docs, but can't understand how I should format the condition so that the map kicks in when I am creating an asset, regardless of the source module, if any. Could you get me started on that? RE: Can we hide fields ONLY when creating a record? - elisa.deko - 05-28-2019 (05-27-2019, 12:22 PM)Guido1982 Wrote:(05-16-2019, 10:15 PM)joebordes Wrote: I would say that this can be done with a field dependency map. The condition would be based on the getCRUDMode function to detect if you are creating/editing and hide the field accordingly Hello, getCRUDMode function for the moment is used only for Validations Map, not for FDep. But, I would suggest you to create a condition in your Field Depencency Map based on a field which has always a default value or is empty in CreateView or another possibility would be to hide them by default and show them once another field is filled after save. That would be the autonumbering field for example which is not even visible in create view. I haven't tested this case yet, but you can try it. For example: <map> <originmodule> <originname>Assets</originname> </originmodule> <dependencies> <dependency> <field>amount</field> <condition>[{"groupid":"", "columnname":"vtiger_assets:asset_no:asset_no:Assets_Asset No:V", "comparator":"e", "value":" ", "columncondition":""}] </condition> <actions> <hide> <field>shippingmethod</field> </hide> </actions> </dependency> </dependencies> </map> Let me know if it works or you need something else Regards Elisa RE: Can we hide fields ONLY when creating a record? - Guido1982 - 05-29-2019 Thanks, I'll try that and let you know. About the columname syntax, I'm guessing that's advanced filtering syntax? Is there any documentation about that Joe? RE: Can we hide fields ONLY when creating a record? - joebordes - 05-29-2019 try here: http://corebos.com/documentation/doku.php?id=en:devel:conditional_popup RE: Can we hide fields ONLY when creating a record? - Guido1982 - 06-04-2019 Thanks! RE: Can we hide fields ONLY when creating a record? - Guido1982 - 06-04-2019 Just for anyone curious: PHP Code: <map> The above map will hide the "cf_1440" (obviously change it with you own) only when creating a new asset. RE: Can we hide fields ONLY when creating a record? - rslemer - 06-04-2019 Good! |