Good day, I have created a channel form to upload content to a webpage. However, I am getting a page error “disallowed key characters”. Here is my code for the channel form and a screenshot of the message in the browser.
{exp:channel:form channel="upload_video" return="{current_path}”}
<div class=”modal-body”>
<div class="input-group">
<span class="input-group-addon">Video Title</span>
<input type="text" class="form-control" placeholder="Video Title" aria-describedby="basic-addon1" name="title" id="title" value="{title}" >
</div>
<div class="input-group">
<span class="input-group-addon">Upload File</span>
<input type="file" name="video_file" id="video_file"/>
<input type="hidden" name="{videos}" value="1"/>
<input type="hidden" name="video_file" value="{video_file}{file_name}{/video_file}"/>
</div>
<div class="input-group">
<span class="input-group-addon">Video Description</span>
<input type="text" class="form-control" placeholder="Video Description" aria-describedby="basic-addon1" name="description" id="description" value="{description}">
</div>
</div>
<div class="modal-footer">
<input type="submit" value="Submit">
</div>
{/exp:channel:form}
Ok. I am a bit lost. However, I just realized another error in my page.
Jay_Turley you previously helped me regarding a channel form question. I used Bootstrap “modal” class to implement the channel form. However, I wish to also use “modal” for the login on that same page and it is cause a problem (cannot run the “modal” class twice - for whatever reason). How can I link the channel form I created to a button (without the “modal” class). Is there an path/href to the channel form?
PS. I think this may be related to the issue I mentioned above, as the (upload) button in the code would be the 3rd “modal” class implementation of a channel form on that page.
Well that’s more of a Bootstrap question. There’s a section on the Bootstrap modal documentation page (“Varying modal content based on trigger button”) which makes me think you ought to be able to put all three forms inside the modal section and then use JavaScript to control which form is displayed based on page state. I realize that’s kind of vague, but this is definitely outside EE territory 😊
So I scrapped the “modal” form idea and create a new template for the channel form. However, I am still getting an error… “The URI you submitted has disallowed characters”
Here is the code I used for the template with the channel form.
{layout="includes/.html-layout"}
<div class=”container top-margin”> <div class=”row” 2%”>
<div class=”col-sm-6”> <div class=”form-area”>
{exp:channel:form channel="youtube_video" return="{path='mypoliwatch'}”} <div class=”form-group”> <label for=”title”>Video Title</label> <input type=”text” class=”form-control” name=”title” id=”title” value=”{title}” placeholder=”Video Title” > </div> <div class=”form-group”> <label for=”url_title”>URL Title</label> <input type=”text” class=”form-control” name=”url_title” id=”url_title” value=”{url_title}” placeholder=”Auto Generated”> </div> <div class=”form-group”> <label for=”video_url”>YouTube Video URL</label> <input type=”text” class=”form-control” name=”video_url” id=”video_url” value=”{video_url}” placeholder=”Paste Video URL”> </div> <div class=”form-group”> <label for=”video_description”>Video Description</label> <input type=”text” class=”form-control” placeholder=”Video Description” name=”video_description” id=”video_description” value=”{video_description}”> </div> <input type=”submit” value=”Submit”>
{/exp:channel:form}
</div> </div> </div> </div>
UPDATE**** The code works… I checked the channel and the video gets added but the error still appears… for some reason it does not return to the page as instructed. It just shows “The URI you submitted has disallowed characters”
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.