05-14-2019, 02:15 PM
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?
Can we hide fields ONLY when creating a record?
|
05-14-2019, 02:15 PM
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?
05-16-2019, 10:15 PM
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.p...dependency
Joe
TSolucio
05-17-2019, 06:18 AM
Nice, seems very powerful. Let me try that and get back to you
05-27-2019, 12:22 PM
(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?
05-28-2019, 10:53 AM
(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
05-29-2019, 06:18 AM
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?
05-29-2019, 09:17 AM
Joe
TSolucio
06-04-2019, 09:54 AM
Thanks!
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. |
« Next Oldest | Next Newest »
|