jtzako
Joined: 12 Jan 2017
Posts: 16
Posted: 2017-01-13 18:37
Back to top
Reply with quote
|
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
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2017-01-13 22:13
Back to top
Reply with quote
|
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
Joined: 12 Jan 2017
Posts: 16
Posted: 2017-01-13 23:41
Back to top
Reply with quote
|
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
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2017-01-14 02:12
Back to top
Reply with quote
|
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&PME_sys_fm=10&PME_sys_sfn[0]=1&sn=2&PME_sys_operation=PME_op_View&PME_sys_rec=",
client_id, \" target=\"_blank\">Client</a>"), "")',
'options' => 'VLF',
'input' => 'R',
'escape' => false,
'sort' => false
);
|
jtzako
Joined: 12 Jan 2017
Posts: 16
Posted: 2017-01-17 16:50
Back to top
Reply with quote
|
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
Joined: 14 Nov 2020
Posts: 1
Posted: 2020-11-21 13:29
Back to top
Reply with quote
|
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
Joined: 20 Apr 2021
Posts: 1104
Posted: 2021-05-30 13:16
Back to top
Reply with quote
|
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
Joined: 20 Apr 2021
Posts: 1104
Posted: 2021-06-15 14:18
Back to top
Reply with quote
|
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
Joined: 20 Apr 2021
Posts: 1104
Posted: 2021-06-16 14:49
Back to top
Reply with quote
|
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
Joined: 09 Aug 2020
Posts: 648
Posted: 2021-06-19 21:04
Back to top
Reply with quote
|
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
Joined: 09 Aug 2020
Posts: 648
Posted: 2021-06-26 15:04
Back to top
Reply with quote
|
https://mhcsandiego.com
Our clinicians only utilize the very latest in therapeutic techniques to help you or your loved one.
mental health disorders
|
laakea
Joined: 20 Apr 2021
Posts: 1104
Posted: 2021-07-29 08:02
Back to top
Reply with quote
|
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.
먹튀검증
|
mark_847
Joined: 02 Aug 2021
Posts: 1
Posted: 2021-08-02 06:49
Back to top
Reply with quote
|
Thanks for sharing such great information, the post you published have some great information which is quite beneficial for me.
MyLowesLife
|
ffw347x9xf
Joined: 01 Aug 2021
Posts: 38
Posted: 2021-08-09 13:18
Back to top
Reply with quote
|
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
Joined: 01 Aug 2021
Posts: 38
Posted: 2021-08-10 11:10
Back to top
Reply with quote
|
Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us.
สล็อต เครดิตฟรี 100 ไม่ต้องฝาก
|
Post new topic
Reply to topic
Goto page 1, 2, 3 ... 40, 41, 42 Next
|