| 
Welcome, Guest
  • Page:
  • 1

TOPIC: Add js event onChange in a text field

Add js event onChange in a text field 3 years 10 months ago #103587

  • kmera
  • kmera
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 4
  • Karma: -
Hi !

I would like to know how I can do to use a Javascript function with the JS event "onChange" in a CB field text.

I want to call a JS function which has Ajax code. When I type something in the field1, there is a call to the JS function which returned a response in Ajax in the field2.

When I want to create a new text field with CB there is no possibility to add javascript or php code.

Thank you for your help.
The administrator has disabled public write access.

Re:Add js event onChange in a text field 3 years 10 months ago #103596

  • krileon
  • krileon
  • OFFLINE
  • Moderator
    Moderator
  • Posts: 31427
  • Karma: 897
You'll either have to:
A. Create a new field type
B. Edit the field in cb.core.php
C. Use a plugin that has JS to find and add the onclick event

One of the 3 should do the trick.
Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
CB links: Documentation - Tutorials - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Advanced, Professional, Developer, or CBSubs subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Advanced, Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
--
If you use Community Builder, please post a rating and a review at the Joomla! Extensions Directory.
The administrator has disabled public write access.

Re:Add js event onChange in a text field 3 years 10 months ago #103605

  • kmera
  • kmera
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 4
  • Karma: -
If I understand I have to modify CB core.
For the moment, I prefer to find a solution with a plugin.
Maybe there is a plugin allows to use Ajax code to update a field from another one (same as drop lists country/states or provinces) ?
The administrator has disabled public write access.

Re:Add js event onChange in a text field 3 years 10 months ago #103612

  • krileon
  • krileon
  • OFFLINE
  • Moderator
    Moderator
  • Posts: 31427
  • Karma: 897
kmera wrote:
If I understand I have to modify CB core.
For the moment, I prefer to find a solution with a plugin.
Maybe there is a plugin allows to use Ajax code to update a field from another one (same as drop lists country/states or provinces) ?

Modifying the core is an option but not recommended. I gave 3 possible solutions above. I am not aware of a plugin that does this. You're welcome to see if anything exists.
Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
CB links: Documentation - Tutorials - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Advanced, Professional, Developer, or CBSubs subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Advanced, Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
--
If you use Community Builder, please post a rating and a review at the Joomla! Extensions Directory.
The administrator has disabled public write access.

Re:Add js event onChange in a text field 3 years 10 months ago #103654

  • kmera
  • kmera
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 4
  • Karma: -
Thank you for your help.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.343 seconds