Ido Angel
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
can i continue the count of an ordered list with pagination?
Started by: Ido Angel in: Toolset Professional Support |
2 | 3 | 6 years, 2 months ago | ||
import multiple instances of custom fields via wp all import
Started by: Ido Angel in: Toolset Professional Support |
2 | 9 | 6 years, 2 months ago | ||
Create M2M related post with information from current post
Started by: Ido Angel
in: Toolset Professional Support
Problem: I have two post types, Patients and Threads, in an M2M relationship. On the Patient single post, I would like to allow site Users to create a new Thread, and automatically relate it to the current Patient. I would also like to include information from the current Patient in the post body of the new Thread. Solution: It's not currently possible to create a new post and related it to another post in an M2M relationship using only one Form, so you would have to use custom code. [credform] [cred_field field="form_messages" class="alert alert-warning"] <div style="display:none;"> [cred_field field="post_title" class="form-control" output="bootstrap" value="Re: [wpv-post-title]"] [cred_field field='post_content' output='bootstrap' value="Re: [wpv-post-link]"] [cred_generic_field type='hidden' field='patient'] { "default":"[wpv-post-id]" } [/cred_generic_field] </div> [cred_field field="form_submit" output="bootstrap" value="Create Thread" class="btn btn-primary btn-lg"] [/credform] 2. Set up the Form to redirect to any other custom Page after submission. add_action('cred_save_data', 'cred_link_patient_and_thread',10,2); function cred_link_patient_and_thread($post_id, $form_data) { // if a specific form if ($form_data['id'] == 12345 ) { toolset_connect_posts( 'patient-thread', $post_id, $_POST['patient'] ); } } 5. Create an Edit Thread Form and place it in an unassigned Layout. add_filter('cred_success_redirect', 'custom_redirect_to_edit_thread',10,3); function custom_redirect_to_edit_thread($url, $post_id, $form_data) { if ($form_data['id']==12345) $redirect = get_the_permalink($post_id) . '?layout_id=67890'; return $redirect; return $url; } 7. Use the Forms API to add complex HTML to the new Thread post_content, including information from the Patient post: add_action('cred_before_save_data', 'cred_generate_new_thread_content',10,1); function cred_generate_new_thread_content($form_data) { // if a specific form if ($form_data['id']==12345) { if (isset($_POST['patient'])) { // build the post_content using the patient's information $patient = $_POST['patient']; $dob = types_render_field("date-of-birth", array("style" => "text", "id" => $patient) ); $body = "<h2>Patient: " . get_the_title( $patient ) . "</h2>"; $body .= "<div>Patient's date of birth: " . $dob . "</div>"; $_POST['post_content'] = $body; } } } Relevant Documentation: |
2 | 16 | 6 years, 2 months ago | ||
Can a user upload a photo from his camera?
Started by: Ido Angel in: Toolset Professional Support |
2 | 3 | 6 years, 2 months ago | ||
category archive doesn't show the views layout i created
Started by: Ido Angel in: Toolset Professional Support |
2 | 12 | 6 years, 2 months ago | ||
wysiwyg custom field not showing right
Started by: Ido Angel
in: Toolset Professional Support
Problem: The issue here is that the user's WYSIWYG field is not outputing the autoparagraphs. Solution: Could you try adding this shortcode around your content ? https://toolset.com/documentation/user-guides/views-shortcodes/#vf-325519 |
2 | 5 | 6 years, 3 months ago | ||
autocomplete for relevanssi doesn't work – maybe product isn't public?
Started by: Ido Angel in: Toolset Professional Support |
2 | 5 | 6 years, 3 months ago | ||
menu "current item" class doesn't list when archive page is pasted as url
Started by: Ido Angel in: Toolset Professional Support |
2 | 4 | 6 years, 3 months ago | ||
Relevanssi doesn’t include custom fields in text search
Started by: Ido Angel
in: Toolset Professional Support
Problem: I am using a text search box to search for posts. I would like to index custom field values using Relevanssi, but they don't seem to be working. Solution: Make sure the text search Query Filter is set up to search through custom fields, and check to be sure the custom field is set up to be indexed in Relevanssi. Rebuild the index. Relevant Documentation: |
2 | 12 | 6 years, 4 months ago | ||
different archive for mobile
Started by: Ido Angel
in: Toolset Professional Support
Problem: Display complete different Views wordpress archive for mobile user. Solution: Use filter hook "wpv_filter_force_wordpress_archive" to trigger a custom PHP function, check if it is a mobile user, then return different wordpress archive ID. Relevant Documentation: |
2 | 3 | 6 years, 4 months ago | ||
when there’s only 1 item in a page, the page breaks
Started by: Ido Angel
in: Toolset Professional Support
Problem: I have a Bootstrap grid View that appears to be working correctly when more than one result is displayed, but if only one result is displayed the grid is broken. Columns are nested inside other columns that should be siblings. Solution: Check for missing closing tags. Simplify the loop output to isolate any potential markup problems. These could be in a nested View, or in the contents of a field being displayed in the View, or a template, for example. |
2 | 5 | 6 years, 4 months ago | ||
jquery after pagination is completed – too slow
Started by: Ido Angel in: Toolset Professional Support |
2 | 3 | 6 years, 5 months ago | ||
can i convert a custom field’s date format?
Started by: Ido Angel
in: Toolset Professional Support
Problem: The issue here is that the user wanted to convert his date time from the database that was created using The Events Calendar plugin. The customer retrieved the value using [wpv-post-field name='_EventStartDateUTC'] Solution: This was actually done by using a custom shortcode. // Add Shortcode function change_date( $atts ) { // Attributes $atts = shortcode_atts( array( 'date' => '', 'format' => '', ), $atts ); $originalDate = $atts['date']; $newDate = date($atts['format'], strtotime($originalDate)); return $newDate; } add_shortcode( 'change_date', 'change_date' ); The shortcode above takes a date in any format and converts it to the desired format. Example [change_date date="[wpv-post-field name='_EventStartDateUTC']" format='Y-m-d H:i:s"'] |
2 | 10 | 6 years, 6 months ago | ||
required error appears in cred frontend dispite fulfilled requirement
Started by: Ido Angel in: Toolset Professional Support |
2 | 11 | 6 years, 6 months ago | ||
"%5B%5D" characters added to url-param, thus search not showing right
Started by: Ido Angel in: Toolset Professional Support |
2 | 12 | 6 years, 6 months ago |