Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter xerviami

    (@xerviami)

    OK thank you !

    Thread Starter xerviami

    (@xerviami)

    Hi @amauric,

    Thank you for the quick answer.

    If the source wordpress site contains responsive ads, will the use of WPmobile plugin prevent them from functionning ?

    Thanks

    Thread Starter xerviami

    (@xerviami)

    Dear Scott,

    Here are both cases in the same shortcode I call in a page:

    $mypod = pods( 'pod_type' );
    $fields = array( 'post_title');
    echo $mypod->form( $fields );
    
    // Autocomplete on an html input field -> works
    
        echo <<<EOT1
        <!DOCTYPE html>
        <html>
        <body>
        
        <input type="text" id="autocomplete_id" name="pods_field_name">
    
        <script src="https://cdn.jsdelivr.net/npm/@tarekraafat/[email protected]/dist/autoComplete.min.js"></script>    
        <script>
        document.addEventListener("DOMContentLoaded", function() {        
            const autoCompleteJS = new autoComplete({
                selector: "#autocomplete_id",
                placeHolder: "Search for Food...",
                data: {
                    src: ["Sauce - Thousand Island", "Wild Boar - Tenderloin", "Goat - Whole Cut"],
                    cache: true,
                },
                resultItem: {
                    highlight: true
                },
                events: {
                    input: {
                        selection: (event) => {
                            const selection = event.detail.selection.value;
                            autoCompleteJS.input.value = selection;
                        }
                    }
                }
            });
        });
        </script>
        
        </body>
        </html>
        EOT1;
    
    
    
    // Autocomplete on a pod form field -> I can't make it work
        echo <<<EOT2
        <!DOCTYPE html>
        <html>
        <body>
        <script src="https://cdn.jsdelivr.net/npm/@tarekraafat/[email protected]/dist/autoComplete.min.js"></script>    
    
        <script>
        document.addEventListener("DOMContentLoaded", function() {
            var titleInput = document.getElementById("pods-form-ui-pods-field-name");
            
            const autoCompleteJS = new autoComplete({
                selector: titleInput,
                placeHolder: "Search for Food...",
                data: {
                    src: ["Sauce - Thousand Island", "Wild Boar - Tenderloin", "Goat - Whole Cut"],
                    cache: true,
                },
                resultItem: {
                    highlight: true
                },
                events: {
                    input: {
                        selection: (event) => {
                            const selection = event.detail.selection.value;
                            autoCompleteJS.input.value = selection;
                        }
                    }
                }
            });
        });
        </script>
        
        </body>
        </html>
        EOT2;
    

    The only difference is the selector:

    <input type="text" id="autocomplete_id" name="pods_field_name">
    [...]
    selector: "#autocomplete_id",

    which becomes:

    var titleInput = document.getElementById("pods-form-ui-pods-field-name");
    [...]
    selector: titleInput,

    As I write these lines, I can see in the autoComplete.js website this: “Works on anything (<input>, <textarea> and contentEditable elements)”

    Could this be the core issue ? Is there any way to make it work together ?

    Thanks a lot !

    Xerviami

    • This reply was modified 10 months, 3 weeks ago by xerviami.
    • This reply was modified 10 months, 3 weeks ago by xerviami.
    xerviami

    (@xerviami)

    OK no problem and thank you for this awesome plugin !

    xerviami

    (@xerviami)

    Dear Tobias,

    I am pretty interested in that approach.

    Is there any documentation about that method ?

    I well found the load/prepare_table/save in the model-table.php file, but it is pretty tought.

    Thank you !

    Xerviami

    Thread Starter xerviami

    (@xerviami)

    OK thank you very much for your quick answer ! ??

    Thread Starter xerviami

    (@xerviami)

    Dear Shaylee,

    First of all, thank you for your answer.

    Yes, 12 is the correct form identifier.

    I changed it to test on dirfferent forms but nothing changed the result. In all cases, I used a print_r(Ninja_Forms()->form( 12 )->get()); to verify that the identifier is the correct one (and changed the id accordingly).

    For the setting concern, please keep in mind that the code I use here is the exact copy of the code available in the codex of Ninja forms (except for the id, which I changed). Therefore I do not see how I can have forgotten something.

    https://developer.ninjaforms.com/codex/fields/

    OK I will open a case to your Customer Success team.

    Thank you !

    Xerviami

    Thread Starter xerviami

    (@xerviami)

    Dear,

    I ran some tests, which make the issue harder…

    On a WP (6.2.2) running on WAMP server on windows 11 -> stars are well visible.

    On my dev. environnement (WP 6.2.2 with MariaDB and NGINX on docker/armv6), stars are not visible.

    Best regards

    Xerviami.

    Thread Starter xerviami

    (@xerviami)

    Dear,

    Unfortunately, I can not give you a link as my work is in an internal network.

    I can send you information or screenshots.

    I totally re-installed a clean wordpress (6.2.2) with nothing added (default theme, no plugin, new database, …). I added the YASR plugin and just asked to automatically insert rating in all pages (nothing more) -> stars are not there.

    Xerviami

    Thread Starter xerviami

    (@xerviami)

    Hi @keraweb ,

    > Since such configurations are static…

    My need is to have non-static POD creation/modification (same flexibility as UI creation, but with code). Therefore configurations are not a convenient way to perform it.

    My use case is:

    • user A creates from the frontend the CPT/POD n°1 -> he becomes the owner of this pod and will be able to add fields, modify its label, … or delete it (other users may be owners of other PODS)
    • other users are able to add/create/delete Items based on CPT/POD n°1

    I do not want to let user A access to the admin page because he would have access to some pod configurations that I do not want to (such as API enabling, pod template, admin page configuration, …).

    Therefore I am re-coding a way for user A to input his new CPT/POD informations from the frontend (name, fields, …) and I wand to pass these informations to a method which programmaticaly creates or modifies the POD.

    At this stage, the only way I found is by using WP-CLI.

    Thank you in advance.

    Xerviami

    • This reply was modified 1 year, 5 months ago by xerviami.
    • This reply was modified 1 year, 5 months ago by xerviami.
    Thread Starter xerviami

    (@xerviami)

    Dear Scott,

    Thank you very much for your answer.

    I also tried these ways to register pods (either with JSON files or with PHP).

    Nevertheles, each method makes these pods non-editable…. -> there is no way (AFAIK) to add/modify fields, either with PHP or from UI.

    Is there a way to make them appear/editable the same ways as PODS registered from the database ?

    In general, is there any way to register PODS with the same results as the ‘wp pods pod add…’ WP-CLI command ? (this command register a new pod in the database and gives the same results as registering it from the UI)

    Thank you in advance

    Best regards

    Xerviami

    • This reply was modified 1 year, 5 months ago by xerviami.
Viewing 11 replies - 1 through 11 (of 11 total)