Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 13. október 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Custom button code question

phpMyEdit Configuration     Custom button code question
Odoslať novú tému   Odpovedať na tému   Choď na stránku 1, 2, 3 ... 50, 51, 52  Ďalší  
 
jtzako     Založený: 12.01.2017   Príspevky: 16  
Príspevok Zaslal: 2017-01-13 18:37
Návrat hore  Odpovedať s citátom     

I'm trying to create a custom button that will open a new URL (php file) with some information passed to it.

I can make it create the custom button this way and it will open the new URL:

$opts['buttons']['L']['up'] = array('<<','<','add','change','copy','>','>>','goto','goto_combo',array(
'name' => 'Email' , 'value' => 'Email', 'code' => '<a href="requestemail.php class="button" target="_BLANK">Email</a>')
);

However, I need to pass to that URL the value of one of my fields for the selected record.

I tried the code below but it isnt working. It stops at the <?php $key; ?> and doesnt populate that, and the class/target and text dont get done either.

$opts['buttons']['L']['up'] = array('<<','<','add','change','copy','>','>>','goto','goto_combo',array(
'name' => 'Email' , 'value' => 'Email', 'code' => '<a href="requestemail.php?PME_sys_rec="<?php $key; ?>" class="button" target="_BLANK">Email</a>')
);

What I need is for when I click that button it gets the currently selected record info to pass to the new php file.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2017-01-13 22:13
Návrat hore  Odpovedať s citátom     

Search in the forum for CONCAT which you can use to create the URL, optionally as a new dummy field in VLF modes or else within the field of the unique identifier.

// Pass the field named `primary_domain_name` in a link to another form such that
// the passed `primary_domain_name` is used as a filter in the other form's List mode.

$opts['fdd']['dummy2'] = array (
'name' => 'Edit',
'sql|VLF' => 'if(primary_domain_name <> "",
CONCAT("<a href=\"data.php?s=22&PME_sys_fl=1&PME_sys_fm=0&PME_sys_sfn[0]=1&PME_sys_qf1=", primary_domain_name, "\" target=\"_blank\">Edit</a>"),
"")',
'options' => 'VLF',
'input' => 'R',
'escape' => false,
'sort' => false
);

 
jtzako     Založený: 12.01.2017   Príspevky: 16  
Príspevok Zaslal: 2017-01-13 23:41
Návrat hore  Odpovedať s citátom     

I've looked extensively at the forum including the CONCAT entries but it does not look like CONCAT can be used with a custom button.

I would only want this button on List mode, it would need to get the value of the record via the selector bullet point similar to how "Change" or "Copy" do currently.

I would want the button to either show up to the left of each row like the graphic buttons do, or up in the row of buttons along with the Add, Change etc.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2017-01-14 02:12
Návrat hore  Odpovedať s citátom     

You'll need a virtual (dummy) field to pass the View link, client_id is the unique identifier in this example. You can make this the first column but it would take a week to determine how to make it appear directly next to the icons for the four functions View, Change, coPy, Delete.

$opts['fdd']['dummy1'] = array (
'sql|VLF' => 'if(client_id <> "",
CONCAT("<a href=\"contacts.php?PME_sys_fl=1&amp;PME_sys_fm=10&amp;PME_sys_sfn[0]=1&amp;sn=2&amp;PME_sys_operation=PME_op_View&amp;PME_sys_rec=",
client_id, \" target=\"_blank\">Client</a>"), "")',
'options' => 'VLF',
'input' => 'R',
'escape' => false,
'sort' => false
);

 
jtzako     Založený: 12.01.2017   Príspevky: 16  
Príspevok Zaslal: 2017-01-17 16:50
Návrat hore  Odpovedať s citátom     

Edit: Found an extra \ that caused the SQL error.

Edit2: Found the problem with undefined index also.


Thanks for the info, this should work nicely.

 
LouieAustin     Založený: 14.11.2020   Príspevky: 1  
Príspevok Zaslal: 2020-11-21 13:29
Návrat hore  Odpovedať s citátom     

Open source platforms are the most used platforms. Open source is the platform to get help with java homework where you will be able to get the right of doing whatever you want to love. There is no restriction on you that you can write this content or that.

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2021-05-30 13:16
Návrat hore  Odpovedať s citátom     

definately enjoy every little bit of it and I have you bookmarked to check out new stuff of your blog a must read blog! saunas supremesauna.com

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2021-06-15 14:18
Návrat hore  Odpovedať s citátom     

Your blog has chock-a-block of useful information. I liked your blog's content as well as its look. In my opinion, this is a perfect blog in all aspects. EMF Protection

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2021-06-16 14:49
Návrat hore  Odpovedať s citátom     

I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading. I had to go show it to my friend and he ejoyed it as well! custom mc patches

 
alexzender     Založený: 09.08.2020   Príspevky: 658  
Príspevok Zaslal: 2021-06-19 21:04
Návrat hore  Odpovedať s citátom     

Dubai Fix Appliance is a team of experts that provide Home Appliance Repair in Dubai, Abu Dhabi & Sharjah. Contact 24/7, +971 525 859817. Call Your Service Now! Appliance Repair Service and Support

 
alexzender     Založený: 09.08.2020   Príspevky: 658  
Príspevok Zaslal: 2021-06-26 15:04
Návrat hore  Odpovedať s citátom     

https://mhcsandiego.com Our clinicians only utilize the very latest in therapeutic techniques to help you or your loved one. mental health disorders

 
laakea     Založený: 20.04.2021   Príspevky: 1164  
Príspevok Zaslal: 2021-07-29 08:02
Návrat hore  Odpovedať s citátom     

Your post is very helpful to get some effective tips to reduce weight properly. You have shared various nice photos of the same. I would like to thank you for sharing these tips. Surely I will try this at home. Keep updating more simple tips like this. &#47673;&#53888;&#44160;&#51613;

 
mark_847     Založený: 02.08.2021   Príspevky: 1  
Príspevok Zaslal: 2021-08-02 06:49
Návrat hore  Odpovedať s citátom     

Thanks for sharing such great information, the post you published have some great information which is quite beneficial for me. MyLowesLife

 
ffw347x9xf     Založený: 01.08.2021   Príspevky: 38  
Príspevok Zaslal: 2021-08-09 13:18
Návrat hore  Odpovedať s citátom     

Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. partfield

 
ffw347x9xf     Založený: 01.08.2021   Príspevky: 38  
Príspevok Zaslal: 2021-08-10 11:10
Návrat hore  Odpovedať s citátom     

Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us. &#3626;&#3621;&#3655;&#3629;&#3605; &#3648;&#3588;&#3619;&#3604;&#3636;&#3605;&#3615;&#3619;&#3637; 100 &#3652;&#3617;&#3656;&#3605;&#3657;&#3629;&#3591;&#3613;&#3634;&#3585;

 
Odoslať novú tému   Odpovedať na tému   Choď na stránku 1, 2, 3 ... 50, 51, 52  Ďalší  

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov