• Resolved Imagestonefunk

    (@stonefunk)


    Hej.
    Is there a way to safely make a shortcode of a database value. How should that code look like. I knowe som sql and some C# but i’m a new ti this web/datanase thing.

    I like to put a database value in a textfield/dropdown inside “Caldera Forms”.

    /Svante

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Imagevaakash

    (@vaakash)

    Hi @stonefunk,

    Thanks for using Shortcoder.

    With shortcoder it is not possible to use SQL since it accepts only static code like HTML/CSS/Javascript.

    You can however write some JS to do some API call where in the backend you can write the SQL query using PHP. However it is beyond the scope of the plugin.

    Thanks,
    Aakash

    Thread Starter Imagestonefunk

    (@stonefunk)

    Thank for your reply @vaakash.

    Is it maybe possible to use MySql stored procedures instead then in shortcoder.
    I belive there is a market for non coding database handling. 🙂

    Most people use a formbuilder lika Caldera Forms and maybe a database tool like WP data Access. The one missing piece is to easy put a database value in a form textbox or dropdown.

    Maybe it is really easy in PHP and that is why such plugin dont exist but i really dont want to edit my complex theme directly in the PHP-code so it chrashes. Therefore i got exited about Shortcoder that my Colibri Theme recommended. It would be fantastic to make “magic tags” in a plugin like Shortcoder.

    /Svante

    Plugin Author Imagevaakash

    (@vaakash)

    Hi @stonefunk,

    Actually, with shortcoder you can use only static content like mentioned earlier. Anything dynamic won’t work.

    There are many plugins out there which support PHP and you can create shortcode for that – https://wordpress.org/plugins/insert-php-code-snippet/

    Creating a shortcode is also very easy which you can do without a need of a plugin – https://developer.wordpress.org/reference/functions/add_shortcode/

    Shortcoder is useful if you have a HTML/CSS/JS snippets which you want to use multiple places and create a shorcode for the same.

    Thanks,
    Aakash

    Thread Starter Imagestonefunk

    (@stonefunk)

    Great, thank you @vaakash.

    Plugin Author Imagevaakash

    (@vaakash)

    Marking this as resolved.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘mysql value in shortcode?’ is closed to new replies.