We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to add text field to Fundraising Payment Form | Forum

Alex Philipp
Alex Philipp May 25 '13
How to add text field to Fundraising Payment Form? So users can add their wishes or tips to admins when they want to donate site// Just need 1 text field before Donate button of Fundraising Payment Form
dave Leader
dave May 25 '13

You could just edit your paypal button to include some text from the user. 

 

Also remember that unless you are a charitable organization it is illegal for you to use the word "donation"  many payment gateways (especially paypal) are cracking down on the use of the word "donation" in any way even in titles on websites if you are not a 501(c)(3) entity.  

 

They are closing down accounts for violators, just fyi..

 

What i did was i changed all the lang in the donation mod to read the word "gift" instead of "donation".   I did this for titles, descriptions, everything.  So the word donation only exist now in the install admin side not the user side at all. 

 

You also have to include this text on payment site page someplace.

 

"Gifts are not tax-deductible, and we are not a 501(c)(3) entity"

 

 

Alex Philipp
Alex Philipp May 25 '13
Dave, thanks for your advices

I just need to specify my question: I mean How to Add Field for User Text (text box), that user can (not required field) to fill with its own wishes or tips for site Admins/ This field should be placed under Amount field. And this text (if user types smth) should be send to Admin with single Submit button, which is already in Donation Form.

Look at the example 









I think there should be the way to integrate this function from free Page Reporter plugin.

I have found special code in file init.php (Page Reporter):


if($_POST){$page = $_POST["page"];$reason = $_POST["reason"];$userId = OW::getUser()->getId();
$now = date("F j, Y, g:i a");
$mail = MAILBOX_BOL_ConversationService::getInstance();$msg = "SITE REPORT: <br> PAGE: $page <Br>Reported: $now <br> Reason: $reason <br> -- END REPORT --";
$send_to = OW::getConfig()->getValue('pagereport', 'send_to');$send_to = explode(",", $send_to);foreach ($send_to as $each) { $mail->createConversation($userId,$each,"SITE REPORT", $msg); }

}
        OW::getFeedback()->info(OW::getLanguage()->text('pagereport', 'pagereport_thankyou'));           $curent_url=OW_URL_HOME;            OW::getApplication()->redirect($curent_url);


}
if(OW::getUser()->isAuthenticated() != TRUE) { return false; }
OW::getEventManager()->bind('core.finalize', 'pagereport');
function pagereport(){
    $userId = OW::getUser()->getId();      $body =   "   <script>   window.getinfo = function() {        var name=prompt(\"Сообщите Ваш вопрос или пожелание для Админов          Please provide a quick overview of the abuse/problem\");             $('#reason').val(name);    if(name == '') { return false; }    if(name == null) { return false; }      }      </script>      <DIV style=\"position: fixed;\">   <form action=\"".OW_URL_HOME."pagereport\" method=\"post\" onSubmit=\"return getinfo();\">   <input type=\"hidden\" name=\"page\" value=\"$url\">   <input type=\"hidden\" id=\"reason\" name=\"reason\" value=\"\">      </form> 
   </div>   ";
   if($userId != "-1")   {    ow::getDocument()->appendBody($body);   }}


So How can we include it to Donation form to add message text field under Amount?


dave Leader
dave May 26 '13

I would have to own the gateway plugin to be able to work on it, sorry.  It is not just adding a field, you have to be able to store it and sanitize the input as well.  I do have the fundraising plugin but in order to see what you see im sure i have to have the gateway plugin as well and i dont have that yet.  I have set up mine as a manual update as i described above with a payment page.  Then i update their account manually.

 

 Wish i could be more help, maybe one others on here can play with thier copy and do some testing for you...  

The Forum post is edited by dave May 26 '13