Hide Bra Size if Male

Hi Guys,

I'm sure there are a truck load of members who would love to know the answer to these questions:

I have items such as:

-Bra_Size

-Endowment_Length

-Circumsized

How do I disable any of the above item selections if a member is a male or female (if famale, disable circumsized item selection)?

Please help

Quote · 21 Jun 2009

You have that Christian Boys School site right?

Quote · 21 Jun 2009

Hi guys,

If anyone can solve this question, there are now a growing number of Dolphin customers who would love to know the answer.

The question again is:

I have a selection item called "Bra Size" and what I want to do is if a male fills in the join form, or if a woman searches for men, this item is greyed out or disabled.

If someone knows the answer, can you please share it with us.

Quote · 22 Jun 2009

I'd leave it alone.  Some men have bigger boobs than a lot of women (see below) ..... have 'em fill it in.


http://media.photobucket.com/image/man%20tits/sandyrg/ManTits.jpg

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Jun 2009

Thanks for the laugh Houston, Cool

But there will also be two other items: circumsized and endowment length.  I don't think too many women would want the option to fill these in.

I am gaining momentum from other Boonex members who are keen to find out how to disable these features, so if someone can help, please do.

Quote · 22 Jun 2009

To be honest, I didn't even know that Dolphin had these features to begin with.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Jun 2009

I don't think conditional custom fields are supported. You would have to hack in a bit of javascript yourself — which probably is not an easy task, you will need at least moderate PHP and JavaScript skills to override this into Dolphin.


Quick and ugly fix is to locate the file that creates the dropdowns, and attach an onChange() action to the Sex field, and have it hide or display the other fields by their IDs. How ugly it'll be depends on the way this is coded.


Pending a full modification that supports conditional selects, you'll just have to fiddle with conditional PHP statements (if / elseif) to get your javascripts inserted into the right dropdowns, matching field names (e.g. field_sex) to the right javascript events to be inserted . Assuming that's how Dolphin works in processing custom fields, and I believe that it is.

Quote · 22 Jun 2009

I don't think conditional custom fields are supported. You would have to hack in a bit of javascript yourself — which probably is not an easy task, you will need at least moderate PHP and JavaScript skills to override this into Dolphin.


Quick and ugly fix is to locate the file that creates the dropdowns, and attach an onChange() action to the Sex field, and have it hide or display the other fields by their IDs. How ugly it'll be depends on the way this is coded.


Pending a full modification that supports conditional selects, you'll just have to fiddle with conditional PHP statements (if / elseif) to get your javascripts inserted into the right dropdowns, matching field names (e.g. field_sex) to the right javascript events to be inserted . Assuming that's how Dolphin works in processing custom fields, and I believe that it is.

Hi Codesatori,

This is one option, but I don't know if it will work?

in the following folder:

/public_html/index/inc/db_cached/profilefields.inc.

How can I make this work (in red):

73 => array(
//item properties
'Name' => 'Bra_Size',
'Type' => 'select_one',
'Control' => "select",
'Extra' => "",
'Min' => null,
'Max' => null,
'Values' => "#!Bra_Size",
'Check' => "if(join.php/Gender<>"female",if(browse.php/Sex<>"female",if(search.php/gender<>"female",if(adv_search.php/Gender<>"female",0, execute Bra_Size)"
'Unique' => false,
'Mandatory' => false,
'UseLKey' => "LKey",
'Caption' => '_FieldCaption_Bra_Size_Join',
'Desc' => '_FieldDesc_Bra_Size_Join',
'MandatoryMsg' => '_FieldError_Bra_Size_Mandatory',
'MinMsg' => '_FieldError_Bra_Size_Min',
'MaxMsg' => '_FieldError_Bra_Size_Max',
'UniqueMsg' => '_FieldError_Bra_Size_Unique',
'CheckMsg' => '_FieldError_Bra_Size_Check',

If you can help, please do.

Quote · 23 Jun 2009

Hi All,

Just received an update from another member who was suggesting that what I need is a Dependent Field, similar to couples and singles.  Am trying to sort this out; any suggestions would be greatly appreciated?

I can pay someone to do this, but, I would prefer to try and work it out myself, if possible.  This way, everyone benefits.

Quote · 23 Jun 2009

I'd leave it alone.  Some men have bigger boobs than a lot of women (see below) ..... have 'em fill it in.


http://media.photobucket.com/image/man%20tits/sandyrg/ManTits.jpg

OMG!

MY EYES! MY EYES! Arrrrrgghhhh....

Quote · 24 Jun 2009

I am also interested to know.

This is like the Country - State dependency.

Quote · 9 Jul 2009

I am also interested to know.

This is like the Country - State dependency.

Script works like a charm!

Hi guys, if you're trying to create something similar, here is a suggestion that works Laughing You will need to insert this script in join.php immediately below your last line containing text or symbol.

<script>
function gender(type)
{
switch (type)
{
case 'male':
bra = document.getElementsByName('Bra_Size[0]')[0];
bra.disabled = true;
bra.value = "0";
document.getElementsByName('Circumsized[0]')[0].disabled = false;
document.getElementsByName('Endowment_Length[0]')[0].disabled = false;
break;

case 'female':
circ = document.getElementsByName('Circumsized[0]')[0];
endowment = document.getElementsByName('Endowment_Length[0]')[0];
document.getElementsByName('Bra_Size[0]')[0].disabled = false;
circ.disabled = true;
circ.value = "0";
endowment.disabled = true;
endowment.value = "0";
break;

default:
document.getElementsByName('Bra_Size[0]')[0].disabled = false;
document.getElementsByName('Circumsized[0]')[0].disabled = false;
document.getElementsByName('Endowment_Length[0]')[0].disabled = false;
}
}

document.getElementById('Sex[0]_Male').onclick = function(){gender('male');}
document.getElementById('Sex[0]_Female').onclick = function(){gender('female');}
document.getElementById('Sex[0]_Transgender').onclick = function(){gender('other');}
document.getElementById('Sex[0]_Couple').onclick = function(){gender('other');}

form = document.getElementById("join_form");
for(i = 0; i < form.elements.length; i++)
if(form.elements[i].type == "submit")
form.elements[i].onclick = function(){gender('other');}

</script>

Quote · 9 Jul 2009

That is the really long way around, especially when you figure for every dependent item you would have to add another section of code to your site.  Now for the simpler way of doing it without mucking up your files and such with an untried/tested in production hack.

 

Go check this link:

 

http://www.expertzzz.com/Downloadz/view/4261

 

It's called a Dependent Field, as I have mentioned before, and with the above mod, which is not pricey at all, you can create primary and secondary fields that are dependent upon anything you want them to be.  Gender, race, religion, bra, cup, teapot, anything your mind can imagine and it's fully manageable from the Admin Panel, where it should be. 

 

So, for those of you who would like multiple dependent fields on the join form, hop over  and enjoy this little toy made by one of the true masters of dolphin.  And no, that's not mwa....

Quote · 10 Jul 2009

That is the really long way around, especially when you figure for every dependent item you would have to add another section of code to your site.  Now for the simpler way of doing it without mucking up your files and such with an untried/tested in production hack.

Go check this link:

http://www.expertzzz.com/Downloadz/view/4261

It's called a Dependent Field, as I have mentioned before, and with the above mod, which is not pricey at all, you can create primary and secondary fields that are dependent upon anything you want them to be.  Gender, race, religion, bra, cup, teapot, anything your mind can imagine and it's fully manageable from the Admin Panel, where it should be.

So, for those of you who would like multiple dependent fields on the join form, hop over  and enjoy this little toy made by one of the true masters of dolphin.  And no, that's not mwa....

Hi Mydatery,

Someone at expertzzz did offer to customize the Dependent Field for me, for a fee, but wasn't confident in writing code to make Verotel payment gateway to work, so I organised a php script writer to write a workaround mod in addition to writing the Verotel payment gateway.

Quote · 10 Jul 2009

goldman, something tells me that wasn't AntonLV (creator of the mod I listed) as he's pretty much able to do anything, I understand he actually works for Boonex.  I've installled his dependent field mods on my sites and it does work exactly as he advertises.  I posted the link because we get a lot of newbies in here who have no real clue about coding, let alone Dolphin coding, and others who swear they are great coders and still get lost once they get inside of the Dolphin files. 

 

I just hate to see one of them blow up a site by trying your trick because they don't understand the variables and such to call for something besides bra size or even how to load their builders pages correctly before they insert the code. If they name their field 1 character off then they will be in here crying that we broke their site.   

 

 

Quote · 10 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.