CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Profiles -- how to remove a required field parameter
Pages: [1]

Author Topic: Custom Profiles -- how to remove a required field parameter  (Read 885 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Custom Profiles -- how to remove a required field parameter
October 22, 2008, 05:07:37 am
Hello,

Please point me to any documentation on this that I might have missed, but I have not been able to find anything yet.

I have some custom templates for a client who wants to remove the 'primary location' drop down and check box. However, now when they submit a new contact or edit a contact, they get these errors:

    *  The Location Type should be set if there is any location information
    * One location should be marked as primary.

So I'm trying to find out how I can remove the validation on these fields? If I can't do that, can I possible set it somewhere to by default mark first location as primary so I can still hide the field?

Thanks much.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Profiles -- how to remove a required field parameter
October 22, 2008, 07:15:57 am

1. i assume u r using only 1 location

2. in your custom template, add a hidden field for the location type and is_primary fields and set their value. The location type rule is an artifact of the old schema and will be cleaned up when we rework the edit page (2.x?_

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Profiles -- how to remove a required field parameter

This forum was archived on 2017-11-26.