vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   problem with custom PM page (https://vborg.vbsupport.ru/showthread.php?t=186935)

squishi 08-01-2008 07:52 AM

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.

h_jinx 08-01-2008 10:46 AM

Use hidden variables

Code:

<input type="hidden" name="title" value="PM TITLE" />

Opserty 08-01-2008 01:08 PM

Quote:

Originally Posted by h_jinx (Post 1589098)
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" />

RLShare 08-01-2008 05:31 PM

^ 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.

nexialys 08-01-2008 05:41 PM

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


All times are GMT. The time now is 02:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01201 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete