Eric
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 |
---|---|---|---|---|---|
Images attached via custom field don't "un-attach" upon removal in post editor
Started by: Eric in: Toolset Professional Support |
2 | 2 | 1 year, 7 months ago | ||
Autocomplete not working on address field
Started by: Eric in: Toolset Professional Support |
2 | 5 | 3 years, 4 months ago | ||
Set/limit number of words or character for custom field output on front-end grid
Started by: Eric in: Toolset Professional Support |
2 | 2 | 3 years, 6 months ago | ||
Using Toolset Address field with FacetWP
Started by: Eric in: Toolset Professional Support |
2 | 4 | 3 years, 6 months ago | ||
CRED edit form with Beaver Builder Themer
Started by: Eric in: Toolset Professional Support |
2 | 2 | 4 years, 5 months ago | ||
State and City dropdowns for CRED
Started by: Eric in: Toolset Professional Support |
2 | 6 | 4 years, 6 months ago | ||
Latest Views update prevents post masonry grid from appearing
1
2
Started by: Eric in: Toolset Professional Support |
2 | 18 | 4 years, 8 months ago | ||
Create slider with images uploaded from custom field
Started by: Eric in: Toolset Professional Support |
3 | 9 | 4 years, 9 months ago | ||
Syntax Highlighting not Working
Started by: Eric in: Toolset Professional Support |
2 | 2 | 5 years, 9 months ago | ||
Post Group restricted content gets display when using anything but Default Error
Started by: Eric in: Toolset Professional Support |
2 | 9 | 6 years, 2 months ago | ||
Automatically adding posts of a category to a post group
Started by: Eric in: Toolset Professional Support |
2 | 4 | 6 years, 3 months ago | ||
Wrapping Types field in a (registered) third-party shortcode not working
Started by: Eric
in: Toolset Professional Support
Problem: I would like to use the Email Encoder Bundle plugin to encode a phone number from a Types field. Solution: Use a custom shortcode to apply the EEB plugin API and the Types field API together: function ts_eeb_field_func($atts) { global $post; $a = shortcode_atts( array( 'field' => '', 'id' => $post->ID, ), $atts ); $field = types_render_field( $a['field'], array( 'id'=>$a['id'] )); return eeb_content( $field ); } add_shortcode("ts-eeb-field", "ts_eeb_field_func"); Relevant Documentation: |
2 | 3 | 6 years, 3 months ago | ||
Method for user to choose post as “favorite”
1
2
Started by: Eric
in: Toolset Professional Support
Problem: I would like to allow my Users to "favorite" posts. Solution: [cred_generic_field field='your-lockbox-agent-id' type='select' class='' urlparam=''] { "required":0, "validate_format":0, "default":[[types usermeta="your-lockbox-agent-id" output="raw" user_current="true"][/types]], "options":[[wpv-view name='list-of-lockbox-agents-view-for-cred-forms']] } [/cred_generic_field] - Create a View of posts that will provide the options for the generic select field. Use this loop format: <wpv-loop> [wpv-item index=1] {"value":"[wpv-post-id]","label":"[wpv-post-title]"} [wpv-item index=other] ,{"value":"[wpv-post-id]","label":"[wpv-post-title]"} </wpv-loop> - Add the following custom filter code to your child theme's functions.php file: add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 ); function prefix_clean_view_output( $out, $id ) { $ids = array( 12345, 67890 ); if ( in_array( $id, $ids )) { $start = strpos( $out, '<!-- wpv-loop-start -->' ); if ( $start !== false && strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false ) { $start = $start + strlen( '<!-- wpv-loop-start -->' ); $out = substr( $out , $start ); $end = strrpos( $out, '<!-- wpv-loop-end -->' ); $out = substr( $out, 0, $end ); } else { $start = strpos( $out, '>' ); if ( $start !== false) { $out = substr( $out, $start + 1 ); $end = strpos( $out, '<' ); $out = trim(substr( $out, 0, $end )); } } } return $out; } - Replace 12345, 67890 with the View's ID, or a comma-separated list of View IDs if you want to apply this filter to more than one View. add_action('cred_save_data', 'save_new_lockbox_agent',10,2); function save_new_lockbox_agent($user_id, $form_data) { $ids = array( 38, 78 ); if( in_array( $form_data['id'], $ids )){ $agent = $_POST['your-lockbox-agent-id']; update_user_meta($user_id, 'wpcf-your-lockbox-agent-id', $agent ); } } Relevant Documentation: |
3 | 27 | 6 years, 6 months ago |