OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
How to make the field mandatory? (0 viewing) 
VehicleManager component support
Go to bottom Favoured: 0
TOPIC: How to make the field mandatory?
#31165
KeeperNET (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
How to make the field mandatory? 7 Months, 2 Weeks ago Karma: 0  
Hi.

Tell me please.

Like the field <? Php echo $ transmission_type_list; ?> Make mandatory?

Thank you.
 
Logged Logged  
  The administrator has disabled public write access.
#31228
KeeperNET (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 7 Months, 2 Weeks ago Karma: 0  
Somebody knows?
 
Logged Logged  
  The administrator has disabled public write access.
#31232
admin (Admin)
Admin
Posts: 5356
graph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 7 Months, 2 Weeks ago Karma: 66  
Hello,

This reply only for developers!!!!!!!!!,
if you not developer - please write to ordasoft -> support -> "contact form" and order this features as customization service.

You need edit file:
(your site)/administrator/components/com_vehiclemanager/vehiclemanager.html.php

In this file, please find function:
static function editVehicle

in this function find code:
Code:

            else if (form.year.value == '') {
              window.scrollTo(0,findPosY(document.getElementById('year'))-100);
              document.getElementById('year').style.borderColor = "#FF0000";
              document.getElementById('year').style.color = "#FF0000";
              return;
            }



and replace it to code

Code:

            else if (form.year.value == '') {
              window.scrollTo(0,findPosY(document.getElementById('year'))-100);
              document.getElementById('year').style.borderColor = "#FF0000";
              document.getElementById('year').style.color = "#FF0000";
              return;
            }
            else if (form.transmission.value == '') {
              window.scrollTo(0,findPosY(document.getElementById('transmission'))-100);
              document.getElementById('transmission').style.borderColor = "#FF0000";
              document.getElementById('transmission').style.color = "#FF0000";
              return;
            }



next: in this function find code:
Code:

                  <td width="185"><?php echo _VEHICLE_MANAGER_LABEL_TRANSMISSION_TYPE; ?>:</td>
                  <td><?php echo $transmission_type_list; ?></td>



and replace it to code
Code:

                  <td width="185"><?php echo _VEHICLE_MANAGER_LABEL_TRANSMISSION_TYPE; ?>*:</td>
                  <td><?php echo $transmission_type_list; ?></td>



Please backup this file first.

If you have pro version, please add this also to file
(your site)/components/com_vehiclemanager/vehiclemanager.html.php



Regards
Andrew
OrdaSoft team
 
Logged Logged  
  The administrator has disabled public write access.
#31243
KeeperNET (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 7 Months, 2 Weeks ago Karma: 0  
Thanks for the answer.

I tried this option. He does not work for me. I think because of the fact that the file "vehiclemanager.html.php" is not explicitly specified "id =" transmission ""
 
Logged Logged  
  The administrator has disabled public write access.
#31244
admin (Admin)
Admin
Posts: 5356
graph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 7 Months, 2 Weeks ago Karma: 66  
With "id" all good

problems 2

1
you need in code

Code:

            else if (form.transmission.value == '') {


replace to :
Code:

            else if (form.transmission.value == '0') {


2. field transmission - on second tab, so user not always see it.

Regards
Andrew
 
Logged Logged  
  The administrator has disabled public write access.
#31323
KeeperNET (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 7 Months, 1 Week ago Karma: 0  
Thank you, it turned out.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top
What are you looking for?
Anti-spam question: How many eyes has a typical person?