Allow PHP variables, etc

Forums Ideas Allow PHP variables, etc

This topic contains 8 replies, has 4 voices, and was last updated by  Edward 2 years, 6 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1249
    simonl
    Member

    It would be great if BSS could allow the use of embedded PHP – especially in forms. For instance, I often have code similar to:

    <form action="<?php echo $_SERVER[ 'PHP_SELF' ]; ?>">
    

    At the moment, when I export from BSS all the < and > are converted to &lt; and &gt;.
    The ability to have embedded PHP that’s preserved on export would be really useful. It’s a pain having to post process exported files.

    • This topic was modified 2 years, 8 months ago by  simonl.
    #1296
    Martin Angelov
    Bootstrap Studio Developer

    Thank you for the suggestion! < and > are escaped for security reasons and I think it will be best to not change it.

    But you can use Custom Code for this. When we add the new Export dialog in the next releases, we will have the option of renaming HTML files to PHP when exporting. When you combine this with Custom Code you will have the ability to use Bootstrap Studio as a simple PHP editor.

    #1306
    simonl
    Member

    Hi Martin,

    Thanks for your response.

    I hear what you’re saying with regards to security, although wouldn’t it be OK to retain <?php and ?>, especially if these are in a form’s action and <input />? After all, BSS doesn’t interpret PHP. I feel that this is quite a big limitation otherwise – post processing is a real pain.

    BTW: I’m not sure it’s possible to add Custom Code within html tags, is it? How would I do that?

    • This reply was modified 2 years, 8 months ago by  simonl. Reason: Added comment regarding Custom Code
    #1325
    Saj
    Member
    Valued

    @simonl,

    Nope you’d have to convert your form to custom code. You can right click on the form in the Overview pane and select Convert to HTML then double click on a form element in the Layout View pane which should take you to the Custom Code tab so you can edit the form in it’s entirety.

    Saj

    #1328
    simonl
    Member

    @saj,

    Well that’s a real shame – and a real deal-breaker for me. How do I get my money back?

    Honestly; I wanted to use BSS for web development beyond simple pages, but having to use custom code means I loose most of the benefits of simple drag-n-drop page and form creation. That’s very disappinting. I can’t believe it would be too difficult to allow such PHP when entered in the panel interface. 🙁

    • This reply was modified 2 years, 8 months ago by  simonl.
    #1330
    Martin Angelov
    Bootstrap Studio Developer

    We want to keep Bootstrap Studio focused on building the frontend of your websites. You can use it to quickly design and prototype how your websites would look and work. After you export you can add any backend that you wish. Writing PHP is best done in an IDE with auto completion, error checking and inline documentation. We can’t possibly support all of this functionality, it will only complicate the app. Not to mention that there are plenty of developers who prefer other backend languages.

    If you think that you have no use for Bootstrap Studio, you can request a refund from our contact form.

    #1331
    simonl
    Member

    Ah, don’t get me wrong – I think BSS is a great tool for initial page building – it’s just that having to post-process such details can’t really be automated, so BSS becomes much less useful in an iterative development cycle.

    Would it really not be possible to enable unescaped code in specific places, such as an input’s value and a form’s action when exporting?

    #1866
    Edward
    Member

    Hi Guys,

    Have a similar issue. As stated above by @simonl, The problem I having is that it’s all cool and good getting the majority of your layout and look and feel sorted. Then you export all, no problem. But I’m a ColdFusion developer so I open the exported files in ColdFusion Builder and or Dreamweaver to start adding my dynamic coding. That’s also all good, no problem. Save the file etc. But when you open the project file in BSS to make major structure and look and feel changes and save the file, export it again, your coding (dynamic) is all gone. So this forces you to make 100% sure of your design and look and feel. Once you start adding dynamic coding to the HTML files (exported) and save it you cannot use BSS to edit structure. Would it not be better to save progress as html?? and not as a project file (.bsdesign) allow to re-open the same file. Am I missing something…

    #1867
    Edward
    Member

    Pingendo (Free app) maybe does not have all the bells and whistles but save your design as HTML. If you edit anything in DW and reopens the HTML file in Pingendo, all stays intact. You perhaps don’t see your dynamic coding but its there…

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.