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

How to make the field mandatory?

KeeperNET (Visitor)
Posts: 0
graphgraph
User Offline
How to make the field mandatory? 6 Years, 11 Months 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.
KeeperNET (Visitor)
Posts: 0
graphgraph
User Offline
Re:How to make the field mandatory? 6 Years, 11 Months ago
Karma: 0  
Somebody knows?
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8243
graph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 6 Years, 11 Months ago
Karma: 101  
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.
KeeperNET (Visitor)
Posts: 0
graphgraph
User Offline
Re:How to make the field mandatory? 6 Years, 11 Months 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.
admin (Admin)
Admin
Posts: 8243
graph
User Offline Click here to see the profile of this user
Re:How to make the field mandatory? 6 Years, 11 Months ago
Karma: 101  
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.
KeeperNET (Visitor)
Posts: 0
graphgraph
User Offline
Re:How to make the field mandatory? 6 Years, 11 Months ago
Karma: 0  
Thank you, it turned out.
Logged Logged
The administrator has disabled public write access.
Go to top
»