Git Product home page Git Product logo

jet-engine-repeater-values's Introduction

Introduction

This is a plugin which extends the Crocoblock Jet Engine plugin for Elementor.

It integrates the Jet Engine repeater fields into the Dynamic Tags functionality of Elementor.

It provides options for integrating all dynamic tag field types directly, instead of using the dynamic widgets.

The Dynamic Visibility functionality supports dynamic tags, so this plugin also adds support for controlling visibility based on a repeater value.

Usage

Install the plugin and then you will find a new option in the list of dynamic tags list, under the runthings.dev group.

You must be in a listing template, accessed via:

Admin panel > Jet Engine > Listings > Select a template > Edit With Elementor

Then click the dynamic tag on any field and scroll down to:

runthings.dev > JetEngine Repeater Field

Once selected, click the wrench icon to the left of the field, and enter the name of the repeater field you want to bind.

You can get the name of the repeater field by going to the place you defined it, eg:

Admin panel > Jet Engine > Post Types > Edit > Repeater Field

The name is defined next to the label in the list of fields.

Changelog

1.2.beta.1 - 18th March 2022

  • Initial support for JetEngine checkbox meta fields, as discussed here: #2

1.1.1 - 19th December 2021

  • Bugfix - Tweak dynamic tag names so they don't clash when a field supports all category types

1.1.0 - 19th December 2021

  • Added licence
  • Added readme
  • Added support for url fields
  • Added support for post meta fields
  • Added support for number fields
  • Added support for color fields
  • Added support for gallery fields
  • Added support for image fields
  • Added support for media fields

1.0.0 - 13th December 2021

  • Initial release
  • Supports text fields

Licence

This plugin is licenced under GPL 3, and is free to use on personal and commercial projects.

Author

Built by Matthew Harris of runthings.dev, copyright 2021-2022.

https://runthings.dev/

jet-engine-repeater-values's People

Contributors

rtpharry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jet-engine-repeater-values's Issues

Not working on text fields only on checkboxes

Hi Matt,

I have this issue where if i set the dynamic visibility to hide a repeater field based on the repeater key (text) nothing happens, but if i try another workaround by adding a checkbox to the repeater field and have the condition say show element if value is checked (Jet Engine specific) then your plugin works just fine.

What could be the issue here?

Background images don't work

First, thank you for your amazing extension. :)

At the moment your plugin supported, to attach media for a widget as background image? Any of widget have a backround option, and i tried to attach a media (which inside the repeater), unfortunately, only the first one is taken as a value, not the others.

Screenshots:
https://prnt.sc/23pcnd3
https://prnt.sc/23pcsm6

Thanks in advance :)

Can't manage to compare values from a repeater field to sort them

What I'm trying to do:

I have a jet engine repeater with 3 keys inside : name, price, link. For each post of a given post_type I want to compare all 'prices' values that exist for this repeater and store the lowest one to a custom meta field. Then I want to also sendthe link value from the same row to another meta field. Finally, those two last meta field should be updated when the post is saved, updated or published.

(It's basically a price comparison tool. )

What I manage to understand or not:

As I understood, using usort() is the best way to proceed since it will sort each array inside the first one, which is perfect for what I tried to achieve as it will allow me to select the link corresponding to the lowest 'price' value. I also understood that using the publish_post hook should do the trick for triggering this function.

But it's not working and I think that's maybe because I don't really understand how the repeater from jet engine is built. Or how the get_post_meta() works.

The code:

//The function to compare values from a given array
function compare_prices($price1, $price2){
    if($price1['price'] == $price2['price']){
        return rand(0,1) ? 1 : -1//if it is the same price then it is random
    }
    return $price1[0]['price'] > $price2[0]['price'];
    // if not it sorts the array
}

//The function to select the best price and update meta fields
function best_product( $id, $post ) {
    if ( get_post_type($post->ID) = 'post_type' ) {  // replace post_type with wanted post type
        $products = get_post_meta( $post->ID, 'link' );  
        usort($products, 'compare_prices');

        $lowest_price = $products[0]['price'];
        $best_link = $products[0]['link'];

        update_post_meta( $post->ID , 'best_link' , $best_link);
        update_post_meta( $post->ID , 'lowest_price' , $lowest_price);

    }
}
add_action( 'publish_post', 'best_product', 10, 2 );

I'm very new at PHP and this really is a huge time consuming issue without getting any result. Any help or tips would be greatly appreciated !

I tried using your plugin but it seems that it is not able to filter the repeatable field in dynamic visibility.

EX:

I have repeater fields of languages, to register technical pdfs.

I would like not to display the Elementor sessions when I don't have pdf files registered.

I used both your example posted in Croco's issue here: https://github.com/Crocoblock/suggestions/issues/2632

But it didn't work. the plugin ends up removing it for good and can't understand my repeatable field.

Is there any fix? Thank you!

Ok, for the dummies

Hello,

I feel like a loser, but this is the first time using GitHub for a problem. Crocoblock recommend this plugin for my problem, but how do I instal it?

Display Heading only if repeater field contains content

Hi Matt,

I've tried your plugin on a single post page. I would like to display a heading only if the user filled out the repeater.
I did try different dynamic visibility settings on the heading.

I feel stupid, but could you help me make it work?
Bildschirmfoto 2023-09-19 um 15 51 26
In the value field I put the number "0".

Here's a example, where the user DID fill out repeater. So it shows the content of the repeater, but not the Heading, like it should:
https://orgelportal.ch/eventkalender/festimfall/

Many thanks,
Dshamilja

Converting JetEngine checkboxes properly

In \jet-engine-repeater-values-master\dynamic-tags\jet-engine-repeater-dynamic-tag-text.php its better to use

jet_engine_render_checkbox_values ($result) (which is a JetEngine function to convert JetEngine checkboxes to string) instead of $this->checkboxes_to_csv_string($result)

repeater values update

Do you have any updates to your (excellent) repeater values plugin? Elementor Pro apparently sees this as an outdated elementer version and running the plugin update causes it to break the plugin.

Screen Shot 2022-10-13 at 2 59 07 PM

Using Checkbox Repeater Fields

Hi!
I am trying to use meta data from the repeater field (checkbox value) in order to show or hide the grid listing on the Single Post Page. I'll try to explain it in context so it makes more sense:
One my Single Post Page in Elementor for Custom Post Type: Schools, I have created a section called Weekly Schedule.
The Weekly Schedule is a repeater field that includes these subfields:
Name
Level
Start Time
Duration
Day of Week (Checkbox): Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

I have created a listing item and with the grid listing I have shown these listing templates under the corresponding day of week. As you can see in my image, I was unable to hide the classes that were supposed to be only on Tue/Thu from the rest of the days of week since I cannot use Dynamic Visibility on Repeater Checkbox Fields either through just JetEngine or your additional plugin.

Screen Shot 2022-02-28 at 12 44 43

Let me know if I explained that well enough, if not, happy to share more information! Thank you so much!

Elementor 3.16.0

Hi i just found out that plugin not working with new elementor 3.16.0. So if you use this plugin don't upgrade elementor jet. Hope author will fix issue.

Clarification around usage

Hi there, apologies if this is a silly question. I came to this plugin from this issue (Crocoblock/suggestions#2515) as I need to accomplish the same thing as the author of that issue (nested repeater listings and filtering the inner one based on the specific value of repeater of the outer one). Can you clarify how I can accomplish this using this plugin? I'm not using Elementor, only Gutenberg, will this be an issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.