TEMA:

Add username to field 1 año 1 semana antes #277493

  • Autor del tema
  • ducman
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 131
  • Gracias recibidas: 0
Good afternoon comrades, can you do that? It would be to create a text field called, for example, "user" and automatically fill in the logged in username (in joomla). It's possible?

Thank you very much for your help!!

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

Add username to field 1 año 1 semana antes #277494

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

please check this:
crosstec.org/en/support/online-documenta...and-classicmode.html

Here is explained how to get this, but don't forget user should be logged in

Regards,
Tihana

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

Add username to field 1 año 1 semana antes #277495

  • Autor del tema
  • ducman
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 131
  • Gracias recibidas: 0
Thanks, but using CB, where do I paste the code? in the PHP section of the text field?

Thanks again!!

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

Add username to field 1 año 1 semana antes #277496

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

please go to CB->Views->View->and in item wrap code of field add:
<?php $value = JFactory::getUser()->get('username'); ?>

Regards,
Tihana

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

Add username to field 1 año 1 semana antes #277497

  • Autor del tema
  • ducman
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 131
  • Gracias recibidas: 0
Thanks, but it doesn't work... I've tried pasting it also in text--> action code // int code and it doesn't work either.

Cheers!

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

Add username to field 1 año 1 semana antes #277498

  • Autor del tema
  • ducman
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 131
  • Gracias recibidas: 0
If I paste it in the item wrap code, the user does appear, but in the list view, it is not saved in the text field.

Cheers

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.064 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!