Dear Minesh,
perfect! It is working fine - now I can easily change the date of the deadline, thanks 🙂
The RULES:
I was talking to my colleagues and here is the actual and final list of the website's rules:
1. A Teacher can submit as many Teams he/she wants – the deadline for the submission is probably 30th October (so it is already done - I can manage it. Cool ? . After this deadline, a teacher can't submit any new Team anymore but he/she can continue to work with already submitted Teams.
2. A Teacher can't see some other teacher's Teams and Projects. He/she can work with his/her Teams only.
3. The main goal of the competition is the submission of a Project and declaring/submitting the authors of this Project = some Team.
4. Each Project can be assigned to ONLY ONE Team – it is impossible to have more than one group of students (Team) as the authors of each Project.
5. Each Team can work only on ONE Project. It means that Teacher can't submit more than ONE Project to each Team.
So I guess we are already passing these rules - so only about the Rule 5: this restriction have to be applied. OK? Thanks! ?
_____________________________________________
What I need to solve still:
1. Dynamic/automatic Post Title as a combination of some fields. I will try to do as we talking by using and editing this code:
add_action('cred_save_data', 'my_custom_save_data_action', 10, 2);
function my_custom_save_data_action( $post_id, $form_data ){
// if a specific form
if ($form_data['id']==188) {
if(!empty($_POST['wpcf-first-name'])){
$first_name = $_POST['wpcf-first-name'];
}
if(!empty($_POST['wpcf-last-name'])){
$last_name = $_POST['wpcf-last-name'];
}
$title = $first_name .' '. $last_name;
$slug = sanitize_title($title);
wp_update_post(array('ID' => $post_id, 'post_title' => $title, 'post_name' => $slug));
}
}
If I will not able to apply it, I will let you know.
2. After some Project Form's submission, I need to see the content of this Form and also bellow the content of selected/assigned Team. Today we were talking about it already so I guess you know how to make it ?
Many thanks again for today's video call!! ?
Best,
Jiri