WordPress.org

Forums

Cimy User Extra Fields
dynamic fields (6 posts)

  1. carblanco
    Member
    Posted 3 years ago #

    Hi Marco,

    I'd need to add some dynamic fields depending on others. I mean, if a car costs 10€ and the user wants 3 I'd like to fill a custom field with the total cost (30€).
    Is it posible? If not, do you know some plugin for that?

    Thanks.

    http://wordpress.org/extend/plugins/cimy-user-extra-fields/

  2. Marco Cimmino
    Member
    Plugin Author

    Posted 3 years ago #

    Maybe using JavaScript/jQuery? Your rules, your power!

  3. carblanco
    Member
    Posted 3 years ago #

    Ok Marco, I'm talking using your plugin. Can I add javascript?

  4. Marco Cimmino
    Member
    Plugin Author

    Posted 3 years ago #

    I don't want to add such feature, because over complicates the ui which is already not super simple and even worse the code.

    But what you can do is to add 3 fields let's say:
    A: cost
    B: amount
    C: total

    and with a simple JS you can pre-file C with A*B (or whatever you want), add the JS in the included javascripts using a simple WP hook called: wp_register_script and wp_enqueue_script.

    As said: your rules, your power!

  5. carblanco
    Member
    Posted 3 years ago #

    Ok, but I can't use the hook with your plugin, right?
    I'm considering two options: formassembly and gravity forms.

  6. Marco Cimmino
    Member
    Plugin Author

    Posted 3 years ago #

    My plug-in already uses those hooks, they are WordPress generic hooks, not sure I understand your question.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cimy User Extra Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic