Skip to content

Commit 09e2ea2

Browse files
committed
remainder of client account tutorial
1 parent 1998c9f commit 09e2ea2

8 files changed

+67
-38
lines changed

_data/screenshots.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -3269,13 +3269,22 @@
32693269
main_link: ""
32703270
list_order: 0
32713271
-
3272-
screenshot_id: 389
3272+
screenshot_id: 390
32733273
component_type: "core"
32743274
component_id: 16
32753275
thumb_filename: "tutorial-client-map-edit-view-general-tab_th.png"
32763276
filename: "tutorial-client-map-edit-view-general-tab.png"
32773277
caption: "Edit View -> General tab"
32783278
main_link: ""
32793279
list_order: 0
3280+
-
3281+
screenshot_id: 390
3282+
component_type: "core"
3283+
component_id: 16
3284+
thumb_filename: "tutorial-client-map-edit-view-filters-tab_th.png"
3285+
filename: "tutorial-client-map-edit-view-filters-tab.png"
3286+
caption: "Edit View -> Filters tab"
3287+
main_link: ""
3288+
list_order: 0
32803289

32813290

_includes/nav_client_accounts_edit_own_data_only.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<li {% if include.selected == 'configure_form_view' %}class="selected"{% endif %}>
1010
<a href="{{site.baseurl}}/tutorials/client_accounts_edit_own_data_only/configure_form_view/">Configure form view</a>
1111
</li>
12-
<li {% if include.selected == 'all_submissions_view' %}class="selected"{% endif %}>
13-
<a href="{{site.baseurl}}/tutorials/client_accounts_edit_own_data_only/all_submissions_view/">Create view showing all submissions</a>
14-
</li>
1512
</ol>
13+
14+
<div {% if include.selected == 'links' %}class="selected"{% endif %}>
15+
<a href="{{site.baseurl}}/tutorials/client_accounts_edit_own_data_only/links/">Related links</a>
16+
</div>
Loading
Loading

tutorials/client_accounts_edit_own_data_only/configure_form_view.html

+33-22
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,28 @@
66
- Tutorials,/tutorials
77
- Configuring client accounts to only edit their own form data
88
prev: Add hidden mapping field,/tutorials/client_accounts_edit_own_data_only/hidden_mapping_field/
9-
next: Create view showing all submissions,/tutorials/client_accounts_edit_own_data_only/all_submissions_view/
9+
next: Related links,/tutorials/client_accounts_edit_own_data_only/links/
1010
categories: tutorial
1111
tags: permissions,accounts,views
1212
---
1313

1414
{% include open_section.html nav='nav_client_accounts_edit_own_data_only.html' selected='configure_form_view' nav_width=3 %}
1515

1616
<p>
17-
The next step is to configure a View:
17+
The next step is to configure one of your Views to:
1818
</p>
1919

2020
<ol>
21-
<li>Automatically store what Form Tools account created the submission.</li>
22-
<li>Set the view to <i>only show submissions for the current client account.</i></li>
21+
<li>automatically store what Form Tools account created the submission, and</li>
22+
<li>only show submissions for the current client account.</li>
2323
</ol>
2424

2525
<h3>Which View?</h3>
2626

2727
<p>
28-
You can read more about <a href="{{site.baseurl}}/userdoc/views/">Views here</a>, but the important things to know
29-
are: you can create as many Views as you want; each View can be configured differently to show different form data;
30-
by default, every new Form gets a new View created along with it called "All submissions".
31-
</p>
32-
33-
<p>
34-
For this tutorial, you can edit any View you'd like - so perhaps just make these changes default All Submissions
35-
view. You can rename it or add more Views later once you get a better feel for it.
28+
You can read more about <a href="{{site.baseurl}}/userdoc/views/">Views here</a>, but for this tutorial, you can
29+
edit any View you'd like - so perhaps just make these changes to the default <i>All Submissions</i> view. You can
30+
rename it or add more Views later once you get a better feel for how it all works.
3631
</p>
3732

3833
<h3>Editing the View</h3>
@@ -71,24 +66,40 @@ <h4>Tracking show created the submission</h4>
7166
</ul>
7267

7368
<p>
74-
What you've just done is configure your View to store the account ID of whatever user just created the form
75-
through the Form Tools interface. As mentioned before, submissions created from an external, API or Form Builder
69+
You've now configured your View to store the account ID of whatever user just created the form through the Form
70+
Tools interface (admin or client). As mentioned before, submissions created from an external, API or Form Builder
7671
form won't have this value populated: it's only for submissions created within Form Tools.
7772
</p>
7873

7974

8075
<h4>Making the View only show submissions for the current user</h4>
8176

77+
<p>
78+
{% include screenshot.html item="tutorial-client-map-edit-view-filters-tab.png" %}
79+
Click on the Filters subtab, add a row in the Client Map filters section with the following information:
80+
</p>
8281

82+
<ul>
83+
<li>
84+
<b>Field</b>: <i>Account ID</i> (this is the field you added earlier)
85+
</li>
86+
<li>
87+
<b>Operator</b>: <i>Equals</i>
88+
</li>
89+
<li>
90+
<b>Client Field</b>: <i>ID</i>.
91+
</li>
92+
</ul>
8393

84-
{% include close_section.html %}
85-
86-
87-
88-
89-
90-
91-
94+
<p>
95+
This tells the View to only show data where your new field contains the same ID as the client account. To test this,
96+
try going to the Accounts page and click the Login link for that user.
97+
</p>
9298

99+
<div class="alert alert-info">
100+
<b>Note</b>: Client Map filters are just that: for clients! If you access this view through an administrator
101+
account the client map filters will not apply: you will see all results.
102+
</div>
93103

94104

105+
{% include close_section.html %}

tutorials/client_accounts_edit_own_data_only/index.html

+7-8
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,23 @@
1717
</p>
1818

1919
<p>
20-
This tutorial explains how you can configure a Form Tools form so client can <i>only edit their own
21-
form data</i> and nobody else's. You can optionally configure it so client accounts can <i>view</i> other data
22-
in the form, but only readonly. This technique works for any form, regardless of form data.
20+
This tutorial explains how you can configure a Form Tools form so a client account can <i>only edit their own
21+
form submission data</i> and nobody else's. You can optionally configure it so client accounts can <i>view</i>
22+
other data in the form, but only readonly. This technique works for any form, regardless of what's in the form.
2323
</p>
2424

2525
<p>
2626
This tutorial is conceptually quite complicated and covers a fair bit of ground. So if you have any questions,
27-
do pipe up with a <a href="https://github.com/formtools/core/issues" target="_blank">question</a>. But once you
28-
see how it works, you'll have a decent understanding of how Form Tools Views work.
27+
do <a href="https://github.com/formtools/core/issues" target="_blank">ask a question on github</a>.
2928
</p>
3029

3130
<p>
32-
In abstract, here's how it'll work.
31+
In abstract, here's what we're going to do.
3332
</p>
3433

3534
<ol>
36-
<li>We're going to add a database field to your form that tracks <b>which Form Tools account created the submission</b>.</li>
37-
<li>We'll configure a form View to limit results to only show results created for the current client account.</li>
35+
<li>First we'll add a database field to your form that tracks <b>which Form Tools account created the submission</b>.</li>
36+
<li>We'll configure one of your form Views to limit results to only show results created for the current client account.</li>
3837
<li>(Optional) create a second readonly View so client accounts can view all data in the form, but not edit it.</li>
3938
</ol>
4039

tutorials/client_accounts_edit_own_data_only/all_submissions_view.html tutorials/client_accounts_edit_own_data_only/links.html

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
tags: permissions,accounts,views
1212
---
1313

14-
{% include open_section.html nav='nav_client_accounts_edit_own_data_only.html' selected='all_submissions_view' nav_width=3 %}
14+
{% include open_section.html nav='nav_client_accounts_edit_own_data_only.html' selected='links' nav_width=3 %}
15+
16+
<p>
17+
Here are a few pages on related information:
18+
</p>
19+
20+
<ul>
21+
<li><a href="{{site.baseul}}/userdoc/views/">Views</a></li>
22+
<li><a href="{{site.baseul}}/userdoc/views/client_map_filters">Client map filters</a></li>
23+
<li><a href="{{site.baseul}}/userdoc/client_accounts/">Client Accounts</a></li>
24+
</ul>
1525

1626
{% include close_section.html %}

tutorials/index.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ <h3>General</h3>
6464
<a href="{{site.baseurl}}/tutorials/client_accounts_edit_own_data_only/">Configuring client accounts to only edit their own form data</a>
6565
</div>
6666
<div class="col-lg-8">
67-
This tutorial explains how you can set up a form so that multiple client accounts can add data to it, but they
68-
can only edit their own data. This tutorial also shows you how you can allow those client accounts to view all
69-
submissions, but readonly.
67+
This tutorial explains how to set up a form so multiple client accounts can add data to it, but can only
68+
edit the data they themselves created.
7069
</div>
7170
</div>
7271

0 commit comments

Comments
 (0)