writing.md - Show error if no cid is provided
authorTim Otten <totten@civicrm.org>
Wed, 12 Dec 2018 22:50:48 +0000 (14:50 -0800)
committerCiviCRM <info@civicrm.org>
Wed, 16 Sep 2020 02:13:17 +0000 (19:13 -0700)
ext/afform/docs/writing.md

index f079a0c4ee89077c49e07452f8d686f4f383d6fe..0530ca74f6ac7584d25d12a81e5ef194da0e3c15 100644 (file)
@@ -32,6 +32,9 @@ http://dmaster.localhost/civicrm/hello-world/#/?cid=123
 How do we use the `cid` to get information about the contact? Update `layout.html` to include data from APIv3:
 
 ```html
+<div ng-if="!routeParams.cid">
+  {{ts('Please provide the "cid"')}}
+</div>
 <div ng-if="routeParams.cid"
   afform-api3="['Contact', 'get', {id: routeParams.cid}]"
   afform-api3-ctrl="apiData">