Gerard
Admite hilos creados en los últimos 30 días: 0
Debates favoritos del foro
Este usuario no tiene debates favoritos.
Temas del foro creados
Status | Debate | Supporter | Voces | Mensajes | Caducidad |
---|---|---|---|---|---|
How do I capture the user submitting a Toolset form?
Iniciado por: Gerard
en: Toolset Professional Support
Problem: How do I capture the username for the user that is submitting a form? Solution: If you are going to capture the username with PHP codes, you can try Form API action hook "cred_save_data": https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data The first argument is user's ID, then use user's ID to get username, for example: https://toolset.com/forums/topic/how-do-i-capture-the-user-submitting-a-toolset-form/#post-1280569 Relevant Documentation: |
2 | 6 | hace 5 años, 5 meses | ||
CPT content are showing!
Iniciado por: Gerard en: Toolset Professional Support |
2 | 3 | hace 6 años, 1 mes | ||
The supplied code fails, Field «Title» is required..
1
2
Iniciado por: Gerard
en: Toolset Professional Support
Problem: Create dynamic post title from custom fields. Solution: An example of how to achieve this can be seen below. function gg_fill_full_name( $post_id, $form_data ){ if ( $form_data['id'] == 126) { $firstname = get_post_meta( $post_id, 'wpcf-first-name', true ); $middlename = get_post_meta( $post_id, 'wpcf-middle-name', true ); $lastname = get_post_meta( $post_id, 'wpcf-last-name', true ); $suffix = get_post_meta( $post_id, 'wpcf-name-suffix', true ); if ($suffix == "None") { $suffix = ''; } $result = $lastname . $suffix . ", " . $firstname . " " . $middlename; // $result = $lastname . " " . $suffix . ", " . $firstname . " " . $middlename; if ( !empty($result) ) { $my_post = array( 'ID' => $post_id, 'post_title' => $result, ); // Update the post into the database wp_update_post( $my_post, $wp_error ); } } } add_action('cred_submit_complete', 'gg_fill_full_name',10,2); |
4 | 26 | hace 6 años, 2 meses | ||
Can Post forms be used by Guests to create posts?
Iniciado por: Gerard
en: Toolset Professional Support
Problem: Is it possible to allow Guests to create posts by submitting Forms? I have set permissions for these Forms in Access Controls, but I'm still having problems submitting the Forms. Solution: In this case, it looks like the transcript field ( file upload field ) is required. Guests, by default, are not allowed to upload Media. In order for a Guest to be able to upload a file to the Media Library, you must use custom code to allow that permission. I added this code to your functions.php file: add_action( 'admin_init','reset_guest_caps' ,9 ); function reset_guest_caps(){ global $current_user, $wpcf_access; if(isset($_GET['formid']) && $_GET['formid']==126&&$current_user->ID==0) { $wpcf_access->settings=array(); } } |
2 | 9 | hace 6 años, 2 meses | ||
Trying to populate the WP Title field with a few other fields..
Iniciado por: Gerard en: Toolset Professional Support |
2 | 3 | hace 6 años, 2 meses | ||
How do I display a group of fields only to Administrators?
Iniciado por: Gerard en: Toolset Professional Support |
2 | 3 | hace 6 años, 3 meses | ||
wpv-conditional used, but failing to work for certain roles..
Iniciado por: Gerard
en: Toolset Professional Support
Problem: I would like to use conditional HTML to make sure the current User is also the author of the post. Solution: Use the correct wpv-user and wpv-current-user shortcodes in your conditional HTML statements. Relevant Documentation: |
2 | 10 | hace 6 años, 3 meses | ||
Need to format a number field (999,999,999), coming from ACF
Iniciado por: Gerard
en: Toolset Professional Support
Problem: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 2 | hace 6 años, 8 meses | ||
Looking for a way to display CPT parent and children as an org chart
Iniciado por: Gerard
en: Types Community Support
Problem: Solution: 1. First you will need to create relationship between parent/child posts and set them as one-to-many relationships. 2. And then display the relational data on a page using Views, both these are explained here in detail: 3. After that you will need to style the relational data using pure html and css. Like its built here as examples (the sample code is also provided here): |
2 | 3 | hace 7 años, 1 mes | ||
Installing the Toolset plugins from WP-Types doesn't work anymore?
Iniciado por: Gerard en: Types Community Support |
2 | 7 | hace 7 años, 3 meses |