Keyword

Make EXTRA fields REQUIRED

  • Serr.biz LLC
  • Serr.biz LLC's Avatar Topic Author
  • Offline
  • New Member
More
14 years 9 months ago #76618 by Serr.biz LLC
Make EXTRA fields REQUIRED was created by Serr.biz LLC
I would like to make some EXTRA fields REQUIRED. Any ideas?

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #76619 by Long Winter
Replied by Long Winter on topic Make EXTRA fields REQUIRED
Me too.. and the basic content area also...??

:)

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #76620 by Omar Al-Ansari
Replied by Omar Al-Ansari on topic Make EXTRA fields REQUIRED
Any luck on the this?

Please Log in or Create an account to join the conversation.

  • Serr.biz LLC
  • Serr.biz LLC's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #76621 by Serr.biz LLC
Replied by Serr.biz LLC on topic Make EXTRA fields REQUIRED
Nope.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #76622 by carmiaca
Replied by carmiaca on topic Make EXTRA fields REQUIRED
Open in Dreamweaver or Notepad  the components>com_k2>views>item>tmpl>form.php page. Edit the submitbutton(pressbutton) function by adding an "else if" line for each field you want to be required and the appropriate alert text. For example:

} else if (trim( document.adminForm.K2ExtraField_1.value ) == "") {            alert( '<?php echo JText::_('You must enter the name of your project', true); ?>' );

 

Make sure you add it before the final  " } else { " statement. You can find out the id of the field (in this case K2ExtraField_1) by using a tool like Firebug in a Firefox browser. The fields may not have the id number you expect, so you need to check it with a tool like Firebug.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #76623 by carmiaca
Replied by carmiaca on topic Make EXTRA fields REQUIRED
You can also find the ID number for the field from the K2 Extra Fields administrator view

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #76624 by BBC
Replied by BBC on topic Make EXTRA fields REQUIRED
I would like to see a little bit of documentation for extra fields coding.

As it is now, even Sobi2 has better manuals. And they are not so known for huge manuals.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #76625 by carmiaca
Replied by carmiaca on topic Make EXTRA fields REQUIRED
I agree. I had to figure this out myself.

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #76626 by shemul
Replied by shemul on topic Make EXTRA fields REQUIRED
thank you so much......

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum