validate a text field based on a date

  • DAVIDPL
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0

DAVIDPL replied the topic: validate a text field based on a date

Hi Michaela

After implementing the project, some inconveniences have arisen:
Athletes do not fill out the form the manager does. so that it is an inconvenience that the manager has to log in every time he fills in an athlete's form, on this point there would be the possibility: to have a summary list with name, last name, where all the forms are detailed and click on the You can also call each form of each athlete, and can edit it.

It would be necessary that the main list is filtered by the manager's id, so that only the forms of that club come out and not the rest without permission
#238973
  • DAVIDPL
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0

DAVIDPL replied the topic: validate a text field based on a date

Hi
Michaela

SET SELECT-LIST IN A SPECIFIC SELECTION BASED ON ANOTHER SELECT-LIST

I have 3 SELECT-LIST

LIST 1. "Selection1"
0; nameA; nameA;
1; nameB; nameB;
2; nameC; nameC;

LIST 2
"Selection2"
0; nameA; 1965;
1; nameB; 1980;
2; name C; 1977;

LIST 3
"Selection3"
0; nameA; 0031;
1; nameB; 0022;
2; name C; 0080;

Both lists have the same order, I want that when you select a value from the first list, automatically select the values ​​of the following:

I've seen a code that I think does something similar but it doesn't work for me.

COD:

// devuelve un índice basado en cero del primer elemento seleccionado en la lista
función getSelected (nombre) {
opts = ff_getElementByName (nombre) .options;
for (i = 0; i <opts.length; i ++) {
if (opta .selected) {
volver i;
}
}
};
// establece el elemento seleccionado en la lista igual al índice
función setSelected (nombre, índice) {
if (index <ff_getElementByName (nombre) .options.length) {
ff_getElementByName (nombre) [índice] .selected = true;
}
};
#239038
  • DAVIDPL
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0

DAVIDPL replied the topic: validate a text field based on a date

<!--ff_getElementByName('Importar1').val = ff_getElementByName('Federado1').val
<!-- ('# ff_Federado1'). change (function () {
<!-- ('# ff_Importar1'). val (jQuery ('# ff_Federado1'). val ())
#239039
  • Posts: 2986
  • Karma: 104
  • Thank you received: 394

mihaela replied the topic: validate a text field based on a date

Hello,

You wrote, "Both lists have the same order, I want that when you select a value from the first list, automatically select the values ​​of the following: ...".

Do you mean that the option in the next select list should be selected or that options of the next select list should be defined?

Regards,

Mihaela
#239071
  • DAVIDPL
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0

DAVIDPL replied the topic: validate a text field based on a date

Hi Michaella

I need to move the values from a joomla (community) table to a breezingform form.
This is the code I have seen published. but unfortunately nothing worked for me, could it be some code error?

$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library
$db = JFactory::getDBO();//Get Database Object
$user = &JFactory::getUser();//Get user Object

//Create your own query
$db->setQuery('Select * From #__comprofiler Where id='.$user->id);
$results = $db->loadObject(); //load the results from the query

// populate the values in the form
ff_setValue('name', $results->firstname." ".$results->lastname);
ff_setValue('Correo_electronico', $user->email);
ff_setValue('Telefono', $results->cb_phone);
ff_setValue('Direccion', $results->cb_address);
ff_setValue('Poblacion', $results->cb_city);
ff_setValue('Codigo_Postal', $results->cb_zipcode);
ff_setValue('Provincia', $results->cb_country);
#239209
  • Posts: 2986
  • Karma: 104
  • Thank you received: 394

mihaela replied the topic: validate a text field based on a date

Hello,

Your code seems to be fine.

Did you place this code in form's Advanced properties > More options > Form pieces > Before Form?

Furthermore, I see that you are looking in a database table "#__comprofiler". Does the name of the table start with the prefix as the other tables in your Joomla database?
Also, check whetehr the column in the "#__comprofiler" table where the user id is being saved is really named "id".

Let me know the result.

Regards,

Mihaela
#239211
Moderators: ForumSupporttomeperica
Time to create page: 0.070 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

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

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

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

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here