Don’t hit me. Yes, I realize that I need to try Solspace forums as well. However, the pool of talent passing thru these parts hopefully ups my odds 😊 And maybe I’m just kinda sorta hopefully sharing a idea?
In short, the Solspace Video module allows for adding a (YouTube) video and relating it to a particular row. In this case I’m going to relate to a weblog row. NBD.
The issue is, that row needs to be defined HERE:
{exp:video:form related_id="HERE" type="weblog" return="video-gallery-upload-done"}in the template prior to the form actually being rendered.
BUT!!! I’m thinking - maybe wrongly - that I can actually make it a one step process. Select the weblog row, add the video to that text box and submit. The trick is to grab the weblog row from the select and then substitute that value with PHP set to Input then jam it in ideally before Solspace does its thing?
Am I crazy? My PHP is only fair. And my love and understanding of forms borders on tragic. Help?
Thanks.
[Mod Edit: Moved to the Modules forum]
Got it!! Silly me, all that wasn’t necessary. In short, here’s the pseudo code worked:
{exp:video:form type="weblog" return="upload-done"}
{embed="video-gallery-weblog-rows-select"}
embed code
<textarea name="url"></textarea>
<input type="submit" value="Submit" />
{/exp:video:form}Maybe this is stating the obvious, but it wasn’t obvious in the Solspace docs (at least not for me). Do NOT put the Solspace related_id in the {exp:video:form} pair loop. Instead, name the select in the embed name=”related_id”.
By rendering the select in the embed you sidestep the parsing order problem when it’s directly within the {exp:video} loop. (Maybe I’m wrong but nesting the loops without the embed didn’t work until I used the embed). That’s it. The module gets the name= it needs to do the relate and upload becomes a one step process.
Actually, more straight forward than I anticipated.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.