Skip to content

Commit d682c5d

Browse files
committed
document File_Field::set_value_type()
1 parent 12c4e1b commit d682c5d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

documentation/2-fields/13-file.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ This field type stores the **ID** of the selected file.
1010

1111
Set the allowed files type. Short mime types are also supported (`audio`, `video`, `image`).
1212

13+
`set_value_type($value_type)`
14+
15+
Set the type of the stored value. *(defaults to `id`)*
16+
17+
You can also `url` to store the URL of the file instead of the ID.
18+
1319
`Field::make("file", "crb_price_list", "Price list (PDF)")`

documentation/2-fields/14-image.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ This field type stores the **ID** of the selected image.
1212

1313
Set the allowed files type. Short mime types are also supported (`audio`, `video`, `image`).
1414

15+
`set_value_type($value_type)`
16+
17+
Set the type of the stored value. *(defaults to `id`)*
18+
19+
You can also `url` to store the URL of the image instead of the ID.
20+
1521
`Field::make("image", "crb_employee_photo", "Photo")`

0 commit comments

Comments
 (0)