Welcome, Guest
Username: Password: Remember me

TOPIC: Hiding a Field on New Record

Hiding a Field on New Record 28 Feb 2013 05:24 #6871

  • organicwebs
  • organicwebs's Avatar
  • Offline
  • Premium Member
  • Chris
  • Posts: 133
  • Thank you received: 21
  • Karma: 4
Hey guys,

I'm creating a form that I would like certain fields to show on new - and certain fields to show on edit.

I guess the models/form/form.xml files are used for both new and edit. Same goes for views/form/tmp/form.php.

Any pointers?

Cheers
Just call me Chris :)
The administrator has disabled public write access.

Re: Hiding a Field on New Record 28 Feb 2013 08:18 #6873

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
The simplest way would be to create 2 layouts; 1 for new and a 2nd for edit - simple!

Then, in your grid/collection, point the edit task to the 'edit' layout you've defined and the 'new' task to the 'new' form.

Hope it helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
The following user(s) said Thank You: organicwebs

Re: Hiding a Field on New Record 05 Mar 2013 10:27 #6912

  • BTB300
  • BTB300's Avatar
  • Offline
  • Moderator
  • Posts: 414
  • Thank you received: 130
  • Karma: 46
Just to point out as well
- if you put an edit task button in the grid of a collection / list view (so that each record has its own edit button)
- it will point to the Default View!
- make sure your default view is your edit layout
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy
Time to create page: 0.094 seconds

Get Started