JEvents 3.1 (Free Access)

Custom Fields Error  Topic is solved

Forum for JEvents 3.1 for Joomla 3.x and 2.5.
Forum rules
When requesting support please follow these steps:

1. Update all JEvents add on's first, via the Joomla! Updater
2. Copy and Paste the JEvents Support Information from the JEvents Control Panel.
3. If you get a 500 error OR white page, enable Maximum Error Reporting in Joomla! Global Config and visit the page again, this should give you a more detailed error and help us provide a prompt response.

Postby Fredie » Sun Feb 17, 2013 1:29 pm

Thanks! I can now save changes to required fields. - fred
Fredie
Gold Members
 
Posts: 446
Joined: Fri Jan 04, 2013 4:41 pm

Postby Fredie » Mon Apr 29, 2013 1:27 am

Geraint wrote:Please change line 234 of plugins/jevevents/jevcustomfields/customfields/jevcfform.php to
Code: Select all
if(testitem.name == name || "custom_"+testitem.name == name || testitem.id == name  || ("#"+testitem.id) == name  || testitem.hasClass(name.substr(1))){
from
Code: Select all
if(testitem.name == name || testitem.id == name  || ("#"+testitem.id) == name  || testitem.hasClass(name.substr(1))){

Then the required check should work.


This worked to resolve a problem with submitting a required custom field, but now I've encountered a similar issue. I need to add a multiple select option, and I would prefer to have it displayed as multiple checkboxes so I've added a custom field type='jevcfcheckbox' with allowmultiple='1' and required='1'. Even after changing the default option, the form will not save. No matter what's selected, it keeps producing the field required message. I have other required fields that are working when this new field isn't included. Here's the code for the field
Code: Select all
<field name="danceLevel" type="jevcfcheckbox" default="-1" label="Dance Level(s)" required="1" description="Select Dance Level" filter="1" allowoverride="1" allowmultiple="1" access="1" requiredmessage="Select the main Dance Level for this dance/event. If it's not a dance, select NA" readaccess="1">
<option value="-1">Select One or more</option>
            <option value="0" default="0" >Basic</option>
            <option value="1" default="0" >MS</option>
            <option value="2" default="0" >Plus</option>
            <option value="3" default="0" >Adv</option>
            <option value="4" default="0" >C</option>
            <option value="5" default="0" >DBD</option>
            <option value="6" default="0" >Rnds</option>
            <option value="7" default="0" >Other</option>
            <option value="8">NA</option>
         </field>
Fredie
Gold Members
 
Posts: 446
Joined: Fri Jan 04, 2013 4:41 pm

Postby Fredie » Mon Apr 29, 2013 1:42 am

P.S. After posting the previous message, I discovered that all of the options didn't have a positive value greater then zero, so I changed the code to what's given below. I also tried various default options, but the form still will not save no matter what's selected.
Code: Select all
<field name="danceLevel" type="jevcfcheckbox" default="1" label="Dance Level(s)" required="1" description="Select Dance Level" filter="1" allowoverride="1" allowmultiple="1" access="1" requiredmessage="Select the main Dance Level for this dance/event. If it's not a dance, select NA" readaccess="1">
            <option value="1" default="0" >Basic</option>
            <option value="2" default="0" >MS</option>
            <option value="3" default="0" >Plus</option>
            <option value="4" default="0" >Adv</option>
            <option value="5" default="0" >C</option>
            <option value="6" default="0" >DBD</option>
            <option value="7" default="0" >Rnds</option>
            <option value="8" default="0" >Other</option>
            <option value="9" default="0" >NA</option>
</field>
Fredie
Gold Members
 
Posts: 446
Joined: Fri Jan 04, 2013 4:41 pm

Postby Geraint » Mon Apr 29, 2013 9:22 am

Checking required fields for multiple checkboxes is potentially complex - is it required that one or all of the fields are checked?

There is a glitch in the javascript code for Joomla 3.0 which I have a fix for and will include in a new release later today. NOTE that it will check for at least one of the options to be selected AND the default value at field level MUST be set to zero i.e. it will look for one of the checkboxes to have a value that doesn't match this. Or otherwise you would do something like this
Code: Select all
    <field name="danceLevel" type="jevcfcheckbox" default="6" label="Dance Level(s)" required="1" description="Select Dance Level" filter="1" allowoverride="1" allowmultiple="1" access="1" requiredmessage="Select the main Dance Level for this dance/event. If it's not a dance, select NA" readaccess="1">
                <option value="1" default="0" >Basic</option>
                <option value="2" default="0" >MS</option>
                <option value="3" default="0" >Plus</option>
                <option value="4" default="0" >Adv</option>
                <option value="5" default="0" >C</option>
                <option value="6" default="1" >DBD</option>
                <option value="7" default="0" >Rnds</option>
                <option value="8" default="0" >Other</option>
                <option value="9" default="0" >NA</option>
    </field>

In this case one of the options OTHER than 6 must be selected.
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42837
Joined: Fri Feb 15, 2008 6:14 pm

Postby Fredie » Mon Apr 29, 2013 12:20 pm

Thank you. I think I can make this work. I want at least one item selected.
Fredie
Gold Members
 
Posts: 446
Joined: Fri Jan 04, 2013 4:41 pm

Postby Geraint » Mon Apr 29, 2013 12:25 pm

I should have the new release available in about an hour from now.
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42837
Joined: Fri Feb 15, 2008 6:14 pm

Postby Fredie » Mon Apr 29, 2013 6:52 pm

Thank you. Updating to Customfields ver 3.0.7 has enabled me to achieve a require multiple select with checkboxes.
Fredie
Gold Members
 
Posts: 446
Joined: Fri Jan 04, 2013 4:41 pm

Postby circoloartisti » Wed Dec 10, 2014 11:57 am

Hi,
i've this error on my browser when i try to check plugin's settings:
JEvents - Custom Fields
jevents / jevcustomfields
Fatal error: Class 'JElement' not found in .../public_html/administrator/components/com_jevents/elements/jevboolean.php on line 17

how can i fix it?
circoloartisti
 
Posts: 4
Joined: Mon Nov 17, 2014 11:49 am

Postby Geraint » Wed Dec 10, 2014 12:06 pm

What version of Joomla, JEvents and the custom fields addon so you have?
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
User avatar
Geraint
 
Posts: 42837
Joined: Fri Feb 15, 2008 6:14 pm

Postby circoloartisti » Wed Dec 10, 2014 12:35 pm

joomla 3.3.6 - jevents 3.1.34 - custom fields 3.1.18
circoloartisti
 
Posts: 4
Joined: Mon Nov 17, 2014 11:49 am

PreviousNext

Return to JEvents 3.1 (Free Access)

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there is 1 user online :: 0 registered and 1 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: No registered users