TEMA:

Remember added en deleted rows in Contenbuilder 3 meses 2 semanas antes #278446

  • Tohm
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 43
  • Gracias recibidas: 0
Hi

I have exactly the same question!!
How can I show the rows that had been added with the WrapperScriptAddDelete script.
When I want to edit datas in CB, it doesn't show them.
I tried to detect if fields are empty or not but the issue is that the javascript loads before values are displayed.
I'm very interested in the solution you found.
Best regard
Tom

In fact, I added this to the WrapperScriptAddDelete script:
I works well if you reload the edit page but it doesn't work if you come from the items list (fields are not filled yet)
var k=1;
   for (k;k<=15;k++)
   {
      var id='#S'+k;
      var setting = JQuery(id).css('display');

      if (setting=='none')
      {
		var elem = JQuery("" + id + " input[type='text']"); 
		var filled = elem.filter(function(){
           return jQuery(this).val() != '';
        });
		if (filled.length === 0) {
		alert(filled.length);
		} else {
		alert(filled.length);
		JQuery(id).css('display', 'block');
		}
	  }
 
   };

Finally solved by adding setTimeout(function() to load it after data are processed.

Thx

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Última Edición: Post by Tohm. Razón: better asked

Remember added en deleted rows in Contenbuilder 3 meses 2 semanas antes #278461

  • Tohm
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 43
  • Gracias recibidas: 0
Problem solved, I just added setTimeout to my script so it is loaded after data are processed.
For those who have the same issue, here is my code in initialization script

function ff_quote_init()
{
WrapperScriptAddDelete();
setTimeout(function(){
var k=1;
for (k;k<=15;k++)
{
var id='#S'+k;
var setting = JQuery(id).css('display');

if (setting=='none')
{
var elem = JQuery("" + id + " input[type='text']");
var filled = elem.filter(function(){
return jQuery(this).val() != '';
});
console.log(filled);
if (filled.length === 0) {
alert(filled.length);
} else {
alert(filled.length);
JQuery(id).css('display', 'block');
}
}

};
}, 300);
} // ff_quote_init

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Remember added en deleted rows in Contenbuilder 3 meses 2 semanas antes #278475

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderador
  • Moderador
  • Registered
  • Mensajes: 12079
  • Gracias recibidas: 779
Hi,

super :)

If you need anything else , feel free to ask

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
  • 2
Moderadores: ForumSupport
Tiempo de carga de la página: 0.052 segundos

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!