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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • api _spec enhancement 'required_alternate'
Pages: [1]

Author Topic: api _spec enhancement 'required_alternate'  (Read 357 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
api _spec enhancement 'required_alternate'
July 18, 2013, 09:05:04 pm
Hi,

I'm just thinking that one thing I am noting a bit is that sometimes x field is required unless y happens to be set. It's hard to make that transparent.

What about in the spec function could use

$params['label']['api.required'] = 1;
$params['label']['api.required_alternate'] = array('name', 'title'); // both
$params['label']['api.required_alternate'] = array('or' => array('name', 'title');//either

This is pretty much the same as verify_mandatory function accepts
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • api _spec enhancement 'required_alternate'

This forum was archived on 2017-11-26.