Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2014, 02:59 PM
FounderSim FounderSim is offline
Member
 
Join Date: Sep 2014
Posts: 65
Gender: Male
Credits: 10,693
FounderSim is on a distinguished road
Default

Thanks for the reply IntoRain.

I seen I could do it that way. I am trying to use the methods already provided in the class "class_formhelper.php".

This way I don't have to like "recode" whats already there if you can understand. It also seems more reasonable to add new methods to the class_formhelper.php when creating new drop down list with database information then the aproach you mentioned as well.

I just don't know how to properly use them. =(
Reply With Quote
  #2  
Old 09-27-2014, 03:18 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,273
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by FounderSim View Post
Thanks for the reply IntoRain.

I seen I could do it that way. I am trying to use the methods already provided in the class "class_formhelper.php".

This way I don't have to like "recode" whats already there if you can understand. It also seems more reasonable to add new methods to the class_formhelper.php when creating new drop down list with database information then the aproach you mentioned as well.

I just don't know how to properly use them. =(
I see. I think the ->build(...) way is more suited to that example you posted. If you want to use this way with the code you already have, we can be a bit hacky about it:

buildAdoptTypeList is a function of the class FormHelper, so you can't do new buildAdoptTypeList(). You need an instance of FormHelper first, then call its functions:

PHP Code:
$exampleHelper = new FormHelper();
$exampleDropdown $exampleHelper->buildAdoptTypeList("myList");//new DropdownList("myList");

//edit: you can do this now:
$petField->add($exampleDropdown); 
And you can add that dropdown $exampleDropdown to the form (or the fieldset you have there)
__________________


asp.net stole my soul.

Last edited by IntoRain; 09-27-2014 at 03:31 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the formatting for form buttons? Infernette Questions and Supports 4 06-18-2015 06:47 PM
Drop Down List to Use Item Messed Up Abronsyth Questions and Supports 4 12-30-2014 10:37 AM
Too many drop down bars? Infernette Questions and Supports 4 01-29-2013 04:01 PM
Submit form Cindykt Questions and Supports 2 08-30-2011 07:47 AM
Alonaria - Human Form alonaria Art Gallery 6 02-26-2011 11:09 AM


All times are GMT -5. The time now is 11:22 AM.

Currently Active Users: 4312 (0 members and 4312 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636