Tripal Plant PopGen Submit
page_1.php
Go to the documentation of this file.
1
<?php
2
8
require_once
'page_1_helper.php'
;
9
require_once
'page_1_ajax.php'
;
10
25
function
tpps_page_1_create_form
(array &$form, array &$form_state) {
26
27
if
(isset($form_state[
'saved_values'
][
TPPS_PAGE_1
])) {
28
$values = $form_state[
'saved_values'
][
TPPS_PAGE_1
];
29
}
30
else
{
31
$values = array();
32
}
33
34
tpps_user_info
($form, $values);
35
36
tpps_publication
($form, $values, $form_state);
37
38
$file_upload_location =
'public://'
. variable_get(
'tpps_study_photo_files_dir'
,
'tpps_study_photos'
);
39
$form[
'study_photo'
] = array(
40
'#type'
=>
'fieldset'
,
41
'#title'
=>
'<div class="fieldset-title">Study Cover Photo: (Optional)</div>'
,
42
'#tree'
=> FALSE,
43
'#collapsible'
=> TRUE,
44
);
45
46
$form[
'study_photo'
][
'photo'
] = array(
47
'#type'
=>
'managed_file'
,
48
'#title'
=> t(
'Please upload a cover photo for your study. This photo will be displayed at the top of the landing page of the study.'
),
49
'#upload_location'
=>
"$file_upload_location"
,
50
'#upload_validators'
=> array(
51
'file_validate_extensions'
=> array(
'img jpg jpeg png'
),
52
),
53
'#default_value'
=> $form_state[
'saved_values'
][TPPS_PAGE_1][
'photo'
] ?? NULL,
54
);
55
56
tpps_organism
($form, $form_state);
57
58
$form[
'Save'
] = array(
59
'#type'
=>
'submit'
,
60
'#value'
=> t(
'Save'
),
61
'#prefix'
=>
'<div class="input-description">* : Required Field</div>'
,
62
);
63
64
$form[
'Next'
] = array(
65
'#type'
=>
'submit'
,
66
'#value'
=> t(
'Next'
),
67
);
68
69
return
$form;
70
}
TPPS_PAGE_1
const TPPS_PAGE_1
Definition:
tpps.module:12
tpps_publication
tpps_publication(array &$form, array $values, array $form_state)
Definition:
page_1_helper.php:65
tpps_organism
tpps_organism(array &$form, array &$form_state)
Definition:
page_1_helper.php:132
tpps_page_1_create_form
tpps_page_1_create_form(array &$form, array &$form_state)
Definition:
page_1.php:25
tpps_user_info
tpps_user_info(array &$form, array $values)
Definition:
page_1_helper.php:19
forms
build
page_1.php
Generated on Tue Feb 14 2023 02:01:29 for Tripal Plant PopGen Submit by
1.8.13