Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-01-2008, 07:52 AM
squishi squishi is offline
 
Join Date: May 2006
Location: Frankfurt
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default problem with custom PM page

I have created a special page that shows the recipient, title and message input fields to send a new PM.
It works great.

Now I want the user not to be able to change the title and recipient field.

So I added the red code to the forms:

Quote:
<input type="text" id="pmrecips_txt" name="recipients" size="25" tabindex="1" value="Admin" disabled />
and
Quote:
<input type="text" class="bginput" name="title" value="PM TITLE" size="30" maxlength="85" tabindex="1" disabled />
Looks just like I want it to be. But when I now click on the send button, vbulletin tells me that the title and message body was not correctly filled out.
Quote:
Please complete both the subject and message fields.
When I remove the "disabled"s, the sending of the PM works again.

How do I get this to work? Why is it not working in the first place?

--------------- Added [DATE]1217580997[/DATE] at [TIME]1217580997[/TIME] ---------------

Okay. I managed to get this to work by adding two hidden fields and by turning the visible form fields into "fake" ones.

I am still interested why this was not working, though.
Reply With Quote
  #2  
Old 08-01-2008, 10:46 AM
h_jinx h_jinx is offline
 
Join Date: Mar 2005
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use hidden variables

Code:
<input type="hidden" name="title" value="PM TITLE" />
Reply With Quote
  #3  
Old 08-01-2008, 01:08 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by h_jinx View Post
Use hidden variables

Code:
<input type="hidden" name="title" value="PM TITLE" />
Read the post, that is exactly what the OP said they did...

On topic: I can't personally see why it would stop working, did you try the xHTML syntax for disabled?

<input... disabled="disabled" />
Reply With Quote
  #4  
Old 08-01-2008, 05:31 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ The newthread forms work the same way in VB, if you disable the subject/message field you cannot sumbit the form even if a value is set.
Reply With Quote
  #5  
Old 08-01-2008, 05:41 PM
nexialys
Guest
 
Posts: n/a
Default

actually, the XHTML form for an disabled input will also disable its activation... so it's just for display, not in posting...

what you can do then is to have an hidden input after the disabled field, with the same values... like h_jinx have suggested... it will then submit when posting...

and xhtml talking is disabled="disabled", like Opserty suggested
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


All times are GMT. The time now is 08:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04011 seconds
  • Memory Usage 2,198KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (4)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete