CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • changes with extra.tpl will not work anymore after Update to 4.5.1
Pages: [1]

Author Topic: changes with extra.tpl will not work anymore after Update to 4.5.1  (Read 313 times)

markjohan

  • I post occasionally
  • **
  • Posts: 102
  • Karma: 0
  • ..
  • CiviCRM version: 4.4.2
  • CMS version: Wordpress 3.6.1
  • MySQL version: 5.1.66-0+squeeze1
  • PHP version: 5.3.27
changes with extra.tpl will not work anymore after Update to 4.5.1
October 15, 2014, 06:17:38 am
Hello everyone,

I have update to 4.5.1 but now my extra.tpl will not work good anymore.

Does someone knows the value for edit the Details field?

It was:
 cj("#details").val('..Some Value here..');

Thanks.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: changes with extra.tpl will not work anymore after Update to 4.5.1
October 15, 2014, 07:15:10 am
You should use firebug or chrome to inspect the element you want to update and use the appropriate selector. If you are unfamiliar with how to use jQuery, there are many good online tutorials out there.
Try asking your question on the new CiviCRM help site.

markjohan

  • I post occasionally
  • **
  • Posts: 102
  • Karma: 0
  • ..
  • CiviCRM version: 4.4.2
  • CMS version: Wordpress 3.6.1
  • MySQL version: 5.1.66-0+squeeze1
  • PHP version: 5.3.27
Re: changes with extra.tpl will not work anymore after Update to 4.5.1
October 15, 2014, 11:43:56 am
Hello,

It is not as simple...

What will work is:

cj("#details").val('Example of TEXT');


The Problem:

I want to change the value of details but only if the value is empty.
It was working in the older version. But Now it is not working..

Could someone please give me a solution. we use CiviCRM with 12 people, and we love to use it. But now we miss the example text for the administration.

THIS NOT WORKS:

{literal}<script>
val=cj("#details").val();
if (!val){
  cj("#details").val('Example of TEXT');
}
</script>{/literal}

markjohan

  • I post occasionally
  • **
  • Posts: 102
  • Karma: 0
  • ..
  • CiviCRM version: 4.4.2
  • CMS version: Wordpress 3.6.1
  • MySQL version: 5.1.66-0+squeeze1
  • PHP version: 5.3.27
Re: changes with extra.tpl will not work anymore after Update to 4.5.1
October 15, 2014, 02:38:59 pm
Hello Everyone,

I first have made a popup to see what is in the value.

1: (put the information in a variable)
val=cj("#details").val();
2: (show a popup when loading some page)
var text = prompt("prompt", val);

Now i know what is the value (it is: "&nbsp;") , i can make a if statement. So if it is "empty"  then i put some information. Else do nothing..

if ((val) == "&nbsp;"){
cj("#details").val('SOME INFORMATION Could be here');
}

If someone have a good tip, i would like te hear it.

FOR NOW, SOLVED  :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • changes with extra.tpl will not work anymore after Update to 4.5.1

This forum was archived on 2017-11-26.