Allowing .php access, for 'Contact Me' form working.
Permalink
Hey there.
I am one of those who still uses the oldschool php form of concact formulars.
However, i am stumbling into the issue of Concrete5 not 'allowing' or can't apparently find the .php file, that is supposed to make this contact formular running.
http://pastebin.com/eqhBNREV (init.js)
http://pastebin.com/wqbfY6Dg (sendEmail.php)
The thing is, when i press "Send" after typing a message - it holds up, cause the Javascript file, cannot find the sendEmail.php.
- Even though i believe i link it correctly
Can it be something with the urls? cause, it things that the script is laying in
http://myURL.io/sendEmail.php
Or is there a way i can redirect it, to actually find the php?
Screenshot of the files & folders:
http://imgur.com/a/e6hoh
The SendEmail is in the folder; inc.
I'd really love to make this work again!
It worked flawless before i converted my site to Concrete5 - so i guess its some setting that gotta be changed of a kind? to allow it to actually route to the PHP file & read it.
Best Regards,
Jesper.
I am one of those who still uses the oldschool php form of concact formulars.
However, i am stumbling into the issue of Concrete5 not 'allowing' or can't apparently find the .php file, that is supposed to make this contact formular running.
http://pastebin.com/eqhBNREV (init.js)
http://pastebin.com/wqbfY6Dg (sendEmail.php)
The thing is, when i press "Send" after typing a message - it holds up, cause the Javascript file, cannot find the sendEmail.php.
- Even though i believe i link it correctly
Can it be something with the urls? cause, it things that the script is laying in
http://myURL.io/sendEmail.php
Or is there a way i can redirect it, to actually find the php?
Screenshot of the files & folders:
http://imgur.com/a/e6hoh
The SendEmail is in the folder; inc.
I'd really love to make this work again!
It worked flawless before i converted my site to Concrete5 - so i guess its some setting that gotta be changed of a kind? to allow it to actually route to the PHP file & read it.
Best Regards,
Jesper.
I could try it out.
I just scrambled my entire site into Concrete5 - so i'm a bit new at it.
I'll def. check it out!
I just scrambled my entire site into Concrete5 - so i'm a bit new at it.
I'll def. check it out!
Haha, it worked apparently out of the box instantly that way.
Need to tweak it a tiny bit though, but everything looks the same apparently as the form did before (as i placed in in the original <div>s)
So it seems smooth, in the terms of coding & pressure on website.
- However, i have an extra question, if you dont mind.
I have enabled the CAPTCHA text, but i'd love to chance the "text" on the code. When i attempt to edit the block, it only makes me change the form - Do i have to go behind the php codes to change the "captcha" text itself?
However, if any still has an idea for the original question (Just so i know it with other PHP files) it would be awsome
- I marked your answer, as the best answer.
Need to tweak it a tiny bit though, but everything looks the same apparently as the form did before (as i placed in in the original <div>s)
So it seems smooth, in the terms of coding & pressure on website.
- However, i have an extra question, if you dont mind.
I have enabled the CAPTCHA text, but i'd love to chance the "text" on the code. When i attempt to edit the block, it only makes me change the form - Do i have to go behind the php codes to change the "captcha" text itself?
However, if any still has an idea for the original question (Just so i know it with other PHP files) it would be awsome
- I marked your answer, as the best answer.
Using your existing script within the context of Concrete5 would be possible but there would be more than 1 way of doing it, all requiring some understanding of Concrete5's architecture. For instance
1- It could be built into a block just like the form block
2- it could be added to theme pages as external files
Explaining how to do it would require some time and I can't say that it is the kind of thing that would be recommended, among others for security reasons.
Concerning your captcha question, which text are you referring to exactly ? Do you mean the text users are supposed to type in or do you mean the label?
1- It could be built into a block just like the form block
2- it could be added to theme pages as external files
Explaining how to do it would require some time and I can't say that it is the kind of thing that would be recommended, among others for security reasons.
Concerning your captcha question, which text are you referring to exactly ? Do you mean the text users are supposed to type in or do you mean the label?
With Captcha
http://i.menix.io/U5J2.png
Without Captcha:
http://i.menix.io/63G2.png
- As you can see, with Captcha "Info Text" it seems a bit misplaced. I am unsure if this is something with the divs, its going in.
also the submit button, i wouldn't mind if its pushed under the textbox - instead of starting under the text to the left.
Thats the only two issues im stumbling into, and i'm unsure if its like that due to something interferring? or a .css file error.
You know a quick way to fix them?
( I'm thinking of going without the Captcha part - no reason to have it since i ain't getting
spambotted atm; so its more like the submit buttons placement - i guess its due to .css, so i gotta look through the files to check what that part is called in the PHP files. )
http://i.menix.io/U5J2.png
Without Captcha:
http://i.menix.io/63G2.png
- As you can see, with Captcha "Info Text" it seems a bit misplaced. I am unsure if this is something with the divs, its going in.
also the submit button, i wouldn't mind if its pushed under the textbox - instead of starting under the text to the left.
Thats the only two issues im stumbling into, and i'm unsure if its like that due to something interferring? or a .css file error.
You know a quick way to fix them?
( I'm thinking of going without the Captcha part - no reason to have it since i ain't getting
spambotted atm; so its more like the submit buttons placement - i guess its due to .css, so i gotta look through the files to check what that part is called in the PHP files. )
yes that is most likely a css problem so I can't really help without seeing the site.
And I agree you should probably do without the captcha. They're a pain anyway.
And I agree you should probably do without the captcha. They're a pain anyway.
portfolio.menix.io
- the site is.
I'm just figuring out where to edit the contact form words "required" into an " * " mark instead.
Otherwise, thank for the help so far & i'm glad you help out.
Sorry its a bit newbish - all new to concrete. But i'm learning fast, as i just heard about the system a few days ago.
- This was how it looked before the "concrete5" rework
http://i.menix.io/73O1.png
& pastebin for the .css part of the old contact forms (before c5)
http://pastebin.com/wiPiBHWb
I had the css for the submit button there, however - i am unsure how to apply it into this new system, also in regards to what the different divs are called by the c5 system.
edit: required is now changed into an * icon
- the site is.
I'm just figuring out where to edit the contact form words "required" into an " * " mark instead.
Otherwise, thank for the help so far & i'm glad you help out.
Sorry its a bit newbish - all new to concrete. But i'm learning fast, as i just heard about the system a few days ago.
- This was how it looked before the "concrete5" rework
http://i.menix.io/73O1.png
& pastebin for the .css part of the old contact forms (before c5)
http://pastebin.com/wiPiBHWb
I had the css for the submit button there, however - i am unsure how to apply it into this new system, also in regards to what the different divs are called by the c5 system.
edit: required is now changed into an * icon
So, just to "fix" the placement, i did a change on the core .php file of view.php.
at line 115, i changed from
div class="form-action">
to
div class="form-actions" style="margin-left: 26%">
it atleast changed the buttons placement for now, to be more "even" to the borders.
however, i know its a 'pre-solution' & it gotta get fixed through css, due to concrete5 updates at some point.
also its not via-able to do in the cores ofc. =D
But its a beginning, to i get it sorted.
at line 115, i changed from
div class="form-action">
to
div class="form-actions" style="margin-left: 26%">
it atleast changed the buttons placement for now, to be more "even" to the borders.
however, i know its a 'pre-solution' & it gotta get fixed through css, due to concrete5 updates at some point.
also its not via-able to do in the cores ofc. =D
But its a beginning, to i get it sorted.
Do this, in your application/blocks folder at the root of your site, create 3 folders one inside the other: form/templates/my_template and inside my_template put a copy of your modified view.php file.
Then modify the copy you just made even more like this
When that's done, put your page in edit mode, click on your form and select "Design & Custom Template"
From the toolbar that appears, click on the little cog icon. From the popup that appears, under "custom template" you should find your template named "My Template". Select it then click on the blue "save" button and then publish your page.
Your form will now be using the template you create and if you upgrade Concrete5, your template will still be in place with your modifications.
Then modify the copy you just made even more like this
<div class="form-actions" style="margin-left: 26%;"> <input style="width: 100%; max-width: 317px;" type="submit" name="Submit" class="btn btn-primary" value="<?php echo h(t($survey->submitText)); ?>" /> </div>
When that's done, put your page in edit mode, click on your form and select "Design & Custom Template"
From the toolbar that appears, click on the little cog icon. From the popup that appears, under "custom template" you should find your template named "My Template". Select it then click on the blue "save" button and then publish your page.
Your form will now be using the template you create and if you upgrade Concrete5, your template will still be in place with your modifications.
Cheers brother.
I'm glad you could help me out, means alot - as a newcomer to the concrete project.
- I did as you said, and i can find & enable it without issues.
So i guess i gotta wait for an update to see if something changes; how often does updates 'usually' comes out for C5?
Just a question, not coding related :D
As you can see my gallery, i'm just using a free one - however, i need a gallery which works like a lightbox (like the one i have)
But also able to add "text" & eventually titles to each pictures.
- I saw you had a plugin of your own.
Is it able to do so? then you might have a new customer! (Also in for thanks for the help!)
I'm glad you could help me out, means alot - as a newcomer to the concrete project.
- I did as you said, and i can find & enable it without issues.
So i guess i gotta wait for an update to see if something changes; how often does updates 'usually' comes out for C5?
Just a question, not coding related :D
As you can see my gallery, i'm just using a free one - however, i need a gallery which works like a lightbox (like the one i have)
But also able to add "text" & eventually titles to each pictures.
- I saw you had a plugin of your own.
Is it able to do so? then you might have a new customer! (Also in for thanks for the help!)
updates depend on what the team is working on. It's not every 2 months that's for sure. Usually, views for core blocks don't change or in a minimal way. You should be fine for a while.
My gallery is Touch Gallery. It comes with 11 templates so 11 different styles. You can have titles with your thumbnails and a description with the image opened in the lightbox. They are both optional.
My gallery is Touch Gallery. It comes with 11 templates so 11 different styles. You can have titles with your thumbnails and a description with the image opened in the lightbox. They are both optional.
Sounds great.
I'll check it out before buy here later on! :)
Thanks alot.
I'll check it out before buy here later on! :)
Thanks alot.
You're very welcome. Thank you!
The only difference is it won't submit through Ajax.