Skip to content

Commit 1c017c8

Browse files
committed
Update outdated documentation on working with Forms record data.
1 parent 941571e commit 1c017c8

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

10/umbraco-forms/developer/working-with-data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ Returns all records with the state set to approved from all Forms on the Umbraco
2222
### GetApprovedRecordsFromFormOnPage
2323

2424
```csharp
25-
PagedResult<IRecord> GetApprovedRecordsFromFormOnPage(int pageId, Guid.Parse("formId"), int pageNumber, int pageSize)
25+
PagedResult<IRecord> GetApprovedRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize)
2626
```
2727

2828
Returns all records with the state set to approved from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
2929

3030
### GetApprovedRecordsFromForm
3131

3232
```csharp
33-
PagedResult<IRecord> GetApprovedRecordsFromForm(Guid.Parse("formId"), int pageNumber, int pageSize)
33+
PagedResult<IRecord> GetApprovedRecordsFromForm(Guid formId, int pageNumber, int pageSize)
3434
```
3535

3636
Returns all records with the state set to approved from the Form with the ID = `formId` as a `PagedResult<IRecord>`.
@@ -46,15 +46,15 @@ Returns all records from all Forms on the Umbraco page with the id = `pageId` as
4646
### GetRecordsFromFormOnPage
4747

4848
```csharp
49-
PagedResult<IRecord> GetRecordsFromFormOnPage(int pageId, Guid.Parse("formId"), int pageNumber, int pageSize)
49+
PagedResult<IRecord> GetRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize)
5050
```
5151

5252
Returns all records from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
5353

5454
### GetRecordsFromForm
5555

5656
```csharp
57-
PagedResult<IRecord> GetRecordsFromForm(Guid.Parse("formId"), int pageNumber, int pageSize)
57+
PagedResult<IRecord> GetRecordsFromForm(Guid formId, int pageNumber, int pageSize)
5858
```
5959

6060
Returns all records from the Form with the ID = formId as a `PagedResult<IRecord>`.

13/umbraco-forms/developer/working-with-data.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,56 @@ The methods can be found by injecting the `Umbraco.Forms.Core.Services.IRecordRe
1313
### GetApprovedRecordsFromPage
1414

1515
```csharp
16-
PagedResult<IRecord> GetApprovedRecordsFromPage(int pageId, int pageNumber, int pageSize)
16+
PagedResult<Record> GetApprovedRecordsFromPage(int pageId, int pageNumber, int pageSize)
1717
```
1818

1919
Returns all records with the state set to approved from all Forms on the Umbraco page with the id = `pageId` .
2020

2121
### GetApprovedRecordsFromFormOnPage
2222

2323
```csharp
24-
PagedResult<IRecord> GetApprovedRecordsFromFormOnPage(int pageId, Guid.Parse("formId"), int pageNumber, int pageSize)
24+
PagedResult<Record> GetApprovedRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize)
2525
```
2626

27-
Returns all records with the state set to approved from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
27+
Returns all records with the state set to approved from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<Record>`.
2828

2929
### GetApprovedRecordsFromForm
3030

3131
```csharp
32-
PagedResult<IRecord> GetApprovedRecordsFromForm(Guid.Parse("formId"), int pageNumber, int pageSize)
32+
PagedResult<Record> GetApprovedRecordsFromForm(Guid formId, int pageNumber, int pageSize)
3333
```
3434

35-
Returns all records with the state set to approved from the Form with the ID = `formId` as a `PagedResult<IRecord>`.
35+
Returns all records with the state set to approved from the Form with the ID = `formId` as a `PagedResult<Record>`.
3636

3737
### GetRecordsFromPage
3838

3939
```csharp
40-
PagedResult<IRecord> GetRecordsFromPage(int pageId, int pageNumber, int pageSize)
40+
PagedResult<Record> GetRecordsFromPage(int pageId, int pageNumber, int pageSize)
4141
```
4242

43-
Returns all records from all Forms on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
43+
Returns all records from all Forms on the Umbraco page with the id = `pageId` as a `PagedResult<Record>`.
4444

4545
### GetRecordsFromFormOnPage
4646

4747
```csharp
48-
PagedResult<IRecord> GetRecordsFromFormOnPage(int pageId, Guid.Parse("formId"), int pageNumber, int pageSize)
48+
PagedResult<Record> GetRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize)
4949
```
5050

51-
Returns all records from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
51+
Returns all records from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<Record>`.
5252

5353
### GetRecordsFromForm
5454

5555
```csharp
56-
PagedResult<IRecord> GetRecordsFromForm(Guid.Parse("formId"), int pageNumber, int pageSize)
56+
PagedResult<Record> GetRecordsFromForm(Guid formId, int pageNumber, int pageSize)
5757
```
5858

59-
Returns all records from the Form with the ID = formId as a `PagedResult<IRecord>`.
59+
Returns all records from the Form with the ID = formId as a `PagedResult<Record>`.
6060

6161
## The returned objects
6262

63-
All of these methods will return an object of type `PagedResult<IRecord>` so you can iterate through the `IRecord` objects.
63+
All of these methods will return an object of type `PagedResult<Record>` so you can iterate through the `Record` objects.
6464

65-
The properties available on a `IRecord` are:
65+
The properties available on a `Record` are:
6666

6767
```csharp
6868
int Id

14/umbraco-forms/developer/working-with-data.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,56 @@ The methods can be found by injecting the `Umbraco.Forms.Core.Services.IRecordRe
1313
### GetApprovedRecordsFromPage
1414

1515
```csharp
16-
PagedResult<IRecord> GetApprovedRecordsFromPage(int pageId, int pageNumber, int pageSize)
16+
PagedResult<Record> GetApprovedRecordsFromPage(int pageId, int pageNumber, int pageSize)
1717
```
1818

1919
Returns all records with the state set to approved from all Forms on the Umbraco page with the id = `pageId` .
2020

2121
### GetApprovedRecordsFromFormOnPage
2222

2323
```csharp
24-
PagedResult<IRecord> GetApprovedRecordsFromFormOnPage(int pageId, Guid.Parse("formId"), int pageNumber, int pageSize)
24+
PagedResult<Record> GetApprovedRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize)
2525
```
2626

27-
Returns all records with the state set to approved from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
27+
Returns all records with the state set to approved from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<Record>`.
2828

2929
### GetApprovedRecordsFromForm
3030

3131
```csharp
32-
PagedResult<IRecord> GetApprovedRecordsFromForm(Guid.Parse("formId"), int pageNumber, int pageSize)
32+
PagedResult<Record> GetApprovedRecordsFromForm(Guid formId, int pageNumber, int pageSize)
3333
```
3434

35-
Returns all records with the state set to approved from the Form with the ID = `formId` as a `PagedResult<IRecord>`.
35+
Returns all records with the state set to approved from the Form with the ID = `formId` as a `PagedResult<Record>`.
3636

3737
### GetRecordsFromPage
3838

3939
```csharp
40-
PagedResult<IRecord> GetRecordsFromPage(int pageId, int pageNumber, int pageSize)
40+
PagedResult<Record> GetRecordsFromPage(int pageId, int pageNumber, int pageSize)
4141
```
4242

43-
Returns all records from all Forms on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
43+
Returns all records from all Forms on the Umbraco page with the id = `pageId` as a `PagedResult<Record>`.
4444

4545
### GetRecordsFromFormOnPage
4646

4747
```csharp
48-
PagedResult<IRecord> GetRecordsFromFormOnPage(int pageId, Guid.Parse("formId"), int pageNumber, int pageSize)
48+
PagedResult<Record> GetRecordsFromFormOnPage(int pageId, Guid formId, int pageNumber, int pageSize)
4949
```
5050

51-
Returns all records from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<IRecord>`.
51+
Returns all records from the Form with the id = `formId` on the Umbraco page with the id = `pageId` as a `PagedResult<Record>`.
5252

5353
### GetRecordsFromForm
5454

5555
```csharp
56-
PagedResult<IRecord> GetRecordsFromForm(Guid.Parse("formId"), int pageNumber, int pageSize)
56+
PagedResult<Record> GetRecordsFromForm(Guid formId, int pageNumber, int pageSize)
5757
```
5858

59-
Returns all records from the Form with the ID = formId as a `PagedResult<IRecord>`.
59+
Returns all records from the Form with the ID = formId as a `PagedResult<Record>`.
6060

6161
## The returned objects
6262

63-
All of these methods will return an object of type `PagedResult<IRecord>` so you can iterate through the `IRecord` objects.
63+
All of these methods will return an object of type `PagedResult<Record>` so you can iterate through the `Record` objects.
6464

65-
The properties available on a `IRecord` are:
65+
The properties available on a `Record` are:
6666

6767
```csharp
6868
int Id
@@ -77,7 +77,7 @@ Guid UniqueId
7777
Dictionary<Guid, RecordField> RecordFields
7878
```
7979

80-
In order to access custom Form fields, these are available in the `RecordFields` property. Furthermore there exists an extension method named `ValueAsString` on `Record` in `Umbraco.Forms.Core.Extensions`, such that you can get the value as string given the alias of the field.
80+
In order to access custom Form fields, these are available in the `RecordFields` property. Furthermore there exists an extension method named `ValueAsString` on `Record` in `Umbraco.Forms.Core.Services`, such that you can get the value as string given the alias of the field.
8181

8282
This extension method handle multi value fields by comma separating the values. E.g. "A, B, C"
8383

@@ -88,7 +88,7 @@ Sample script that is outputting comments using a Form created with the default
8888
```csharp
8989
@using Umbraco.Core;
9090
@using Umbraco.Cms.Core.Composing;
91-
@using Umbraco.Forms.Core.Extensions;
91+
@using Umbraco.Forms.Core.Services;
9292
@inject IRecordReaderService _recordReaderService;
9393

9494
<ul id="comments">

0 commit comments

Comments
 (0)