Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 313 online users. » 0 Member(s) | 311 Guest(s) Bing, Google
|
Latest Threads |
UserSpice Alpha Testing a...
Forum: News Center
Last Post: ivinsons
11-08-2024, 06:13 PM
» Replies: 13
» Views: 42,475
|
UserSpice 4.4 Development
Forum: News Center
Last Post: Amelie12
09-21-2024, 12:23 PM
» Replies: 4
» Views: 15,199
|
Welcome to the new UserSp...
Forum: News Center
Last Post: ivinsons
08-25-2024, 07:39 AM
» Replies: 2
» Views: 27,918
|
How to use hasPerm
Forum: UserSpice 4.4
Last Post: mudmin
07-20-2019, 02:45 PM
» Replies: 1
» Views: 13,755
|
Session issue? What I sho...
Forum: UserSpice 4.4
Last Post: Parth
07-17-2019, 05:06 PM
» Replies: 4
» Views: 14,502
|
Email Error
Forum: UserSpice 4.4
Last Post: Brandin
07-17-2019, 04:47 PM
» Replies: 1
» Views: 6,623
|
{ Missing Text } after up...
Forum: UserSpice 4.4
Last Post: Brandin
07-16-2019, 04:23 PM
» Replies: 22
» Views: 53,638
|
Best Practice Info
Forum: New to UserSpice?
Last Post: Brandin
07-16-2019, 11:55 AM
» Replies: 1
» Views: 13,490
|
Force to use 2FA -always-
Forum: UserSpice 4.4
Last Post: Brandin
07-12-2019, 12:43 PM
» Replies: 1
» Views: 6,636
|
e-mail not verifying
Forum: UserSpice 4.4
Last Post: LBC
07-10-2019, 11:34 AM
» Replies: 31
» Views: 76,232
|
|
|
Help with passing data using Modal |
Posted by: muhammedc - 08-27-2017, 05:20 AM - Forum: UserSpice 4.3 and Below
- Replies (3)
|
|
Hi guys...
So wondering if any of you have any experience using modal... So what I am trying to achieve, is to display a grid of data and a button next to each row which when a user clicks will popup a modal and ask for an email address. Then take that email address and submit it to another php file to generate pdf document and email that address. The problem I am having is the variable passed to the modal post command is that last row and not the row of the actual line where the button is...
here is some code:
<table class="table table-hover">
<thead>
<tr>
<th>Id</th>
<th>File#</th>
<th>Subject</th>
<th>Author</th>
<th>Date Created</th>
<th>Last Edited By</th>
<th>Date Last Edited</th>
<th>PDF</th>
</tr>
</thead>
<tbody>
<tr>
<?php foreach ($filenumberResult as $FNR) { ?>
<td><?=$FNR->ID?></td>
<td><a>ID?>"><?=$FNR->FILENUMBER?></a></td>
<td><a>ID?>"><?=$FNR->SUBJECT?></a></td>
<td><?php echouser ($FNR->AUTHOR);?></td>
<td><?=$FNR->DATECREATED?></td>
<td><?php echouser ($FNR->LASTEDITEDBY);?></td>
<td><?=$FNR->DATELASTEDITED?></td>
<td><a>ID?>&fn=<?=$FNR->FILENUMBER?>&dov=D&webkey=<?=$FNR->WEBKEY?>&subject=<?=$FNR->SUBJECT?>"><i class="fa fa-fw fa-file-pdf-o"></i></a> | <a>ID?>&fn=<?=$FNR->FILENUMBER?>&dov=I&webkey=<?=$FNR->WEBKEY?>" target="_blank"><i class="fa fa-fw fa-eye"></i></a> | ID?>"><i class="glyphicon glyphicon-envelope"></i></td>
</tr>
<?php } ?>
</tbody>
<!-- Trigger the modal with a button -->
<!-- Modal -->
<div class="modal fade" id="email-letter" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" action="emailpdf.php?id=<?=$FNR->ID?>&fn=<?=$FNR->FILENUMBER?>&dov=S&webkey=<?=$FNR->WEBKEY?>&subject=<?=$FNR->SUBJECT?>" method="post">
<div class="modal-header"><h4>Email Letter...</h4></div>
<div class="modal-body">
<div class="form-group">
<?php dump($FNR->ID);?>
<label for="contact-email" class="col-lg-2 control-label">E-mail:</label>
<div class="col-lg-10">
<input type="email" class="form-control" name="contact-email" id="contact-email" placeholder="you@example.com" required><br>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="submit">Send Message</button>
<a>Cancel</a>
</div>
</form>
</div>
</div>
</div>
The line:
form class="form-horizontal" action="emailpdf.php?id=<?=$FNR->ID?>&fn=<?=$FNR->FILENUMBER?>&dov=S&webkey=<?=$FNR->WEBKEY?>&subject=<?=$FNR->SUBJECT?>" method="post">
is always getting the last row data and not the row it is assigned to.
I need to figure out how to pass the actual row variables in the action="emailpdf.php?id= protion but am stumped.
I hope im making sense... Any ideas or help cos i have searched and cant seem to figure this out.
Thanks -M
|
|
|
Admin Dashboard Q |
Posted by: Katronix - 08-26-2017, 06:06 PM - Forum: UserSpice 4.3 and Below
- Replies (5)
|
|
Greetings all from soggy Texas,
I'm starting to develop a new product that for lack of better terms will be Drupal / Joomla like. I'm curious instead of having the UserSpice dashboard and my own dashboard is there any way to combine the two?
|
|
|
Hide links to users |
Posted by: dormido - 08-25-2017, 03:45 PM - Forum: Off-topic Discussions
- Replies (22)
|
|
I'm using
<pre> Code: <? Php if (checkMenu (2, $ user-> data () -> id)) {?>
<! - <a href = "#"> Link </a> ->
<? Php}?>
</pre>
But that breaks some things on my site with Code: Notice: Undefined property: stdClass::
|
|
|
Status Update 005 |
Posted by: mudmin - 08-25-2017, 01:05 PM - Forum: UserSpice 4.3 and Below
- Replies (5)
|
|
This is a cumulative update of lots of stuff we've been talking about in the forums.
The DB class has been updated with PLB/Faguss' updates.
The Validate class has been updated with Karsen/Faguss' updates.
The fetchAllUsers function has been made to accept optional parameter 1 for "order by" and optionally TRUE as parameter 2 to order by DESC.
Brandin did some great work on forcing password resets.
Little other random bugfixes.
Again, this is the move fast and break things phase (although that's winding down).
PLEASE test things and PLEASE comment on the implementations.
Full diff can be found here.
https://github.com/mudmin/UserSpice43dev...338f0ae56e
|
|
|
|